Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #8741

Re: javascript: and about: Protocols Not Working

Date 2011-12-01 14:02 +0100
From Martin Honnen <mahotrash@yahoo.de>
Organization Liberty Development
Newsgroups comp.lang.javascript
Subject Re: javascript: and about: Protocols Not Working
References <66pdd7trvg6davamt33l7kb45f3v3lqdn2@4ax.com> <4ed75ca4$0$6638$9b4e6d93@newsspool2.arcor-online.net> <timstreater-5A797A.12374601122011@news.individual.net>
Message-ID <4ed77afb$0$6643$9b4e6d93@newsspool2.arcor-online.net> (permalink)

Show all headers | View raw


Tim Streater wrote:
> In article <4ed75ca4$0$6638$9b4e6d93@newsspool2.arcor-online.net>,
> Martin Honnen <mahotrash@yahoo.de> wrote:
>
>> Gene Wirchenko wrote:
>> > Dear JavaScripters:
>> >
>> > The text that I am using refers to javascript: and about:
>> > protocols. None of the examples will run on my system (IE 9 on
>> > Windows 7).
>> >
>> > For
>> > javascript:Date()
>> > I get nothing.
>>
>> Well where/how do you use it exactly? When I type that line into IE
>> 9's address bar and hit enter it displays the current date (e.g. Thu
>> Dec 1 11:51:52 UTC+0100 2011) in the browser window.
>
> I get nothing in Safari either. But I find this unsurprising, since
> you've not told anyone to do anything with the date info that Date()
> returns. If I go javascript:alert(Date()); then I get an alert panel up
> with the date/time in it. Or I can do javascript:console.info(Date());
> and get the time/date in the error console window as expected.
>
> Or I can do javascript:document.write(Date()); and then it appears in
> the browser window as expected. If IE9 is putting it there without
> document.write I'd call that a bug.

Not at all, with a javascript: URL you are supposed to write some 
Javascript code that is evaluated and whose value is then displayed in 
the window or frame. At least that was the original intent when the 
syntax was introduced. You even had to use
   void 0
at the end of your Javascript code if you did not want the result of the 
code to be displayed in the window or frame.

-- 

	Martin Honnen --- MVP Data Platform Development
	http://msmvps.com/blogs/martin_honnen/

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

javascript: and about: Protocols Not Working Gene Wirchenko <genew@ocis.net> - 2011-11-30 18:28 -0800
  Re: javascript: and about: Protocols Not Working Martin Honnen <mahotrash@yahoo.de> - 2011-12-01 11:53 +0100
    Re: javascript: and about: Protocols Not Working Richard Cornford <Richard@litotes.demon.co.uk> - 2011-12-01 04:29 -0800
    Re: javascript: and about: Protocols Not Working Tim Streater <timstreater@greenbee.net> - 2011-12-01 12:37 +0000
      Re: javascript: and about: Protocols Not Working Martin Honnen <mahotrash@yahoo.de> - 2011-12-01 14:02 +0100
        Re: javascript: and about: Protocols Not Working Martin Honnen <mahotrash@yahoo.de> - 2011-12-01 14:19 +0100
          Re: javascript: and about: Protocols Not Working "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2011-12-02 11:31 +0200
            Re: javascript: and about: Protocols Not Working Martin Honnen <mahotrash@yahoo.de> - 2011-12-02 15:43 +0100
              Re: javascript: and about: Protocols Not Working "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2011-12-02 19:57 +0200
    Re: javascript: and about: Protocols Not Working Richard Cornford <Richard@litotes.demon.co.uk> - 2011-12-01 04:03 -0800
    Re: javascript: and about: Protocols Not Working Gene Wirchenko <genew@ocis.net> - 2011-12-01 12:14 -0800
      Re: javascript: and about: Protocols Not Working Erwin Moller <Since_humans_read_this_I_am_spammed_too_much@spamyourself.com> - 2011-12-02 10:01 +0100
        Re: javascript: and about: Protocols Not Working Gene Wirchenko <genew@ocis.net> - 2011-12-02 12:35 -0800
          Re: javascript: and about: Protocols Not Working Tim Streater <timstreater@greenbee.net> - 2011-12-02 20:39 +0000
            Re: javascript: and about: Protocols Not Working Gene Wirchenko <genew@ocis.net> - 2011-12-02 13:56 -0800
              Re: javascript: and about: Protocols Not Working Tim Streater <timstreater@greenbee.net> - 2011-12-02 23:40 +0000
              Re: javascript: and about: Protocols Not Working Dr J R Stockton <reply1148@merlyn.demon.co.uk> - 2011-12-03 19:13 +0000
            Re: javascript: and about: Protocols Not Working Jake Jarvis <pig_in_shoes@yahoo.com> - 2011-12-02 23:01 +0100
  Re: javascript: and about: Protocols Not Working Arno Welzel <usenet@arnowelzel.de> - 2011-12-04 15:46 +0100
  Re: javascript: and about: Protocols Not Working Bwig Zomberi <zomberiMAPSONNOSPAM@gmail.invalid> - 2011-12-06 11:41 +0530

csiph-web