Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion why javascript:
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
jukka.korpela  
View profile  
 More options Oct 20 1999, 3:00 am
Newsgroups: comp.lang.javascript
From: Jukka.Korp...@hut.fi
Date: 1999/10/20
Subject: Re: why javascript:
On 19 Oct 1999 16:09:07 -0700, Lee <boy...@worldnet.att.net> wrote:

>In the context of:
> <a href="javascript:newpage()">
>where HTML syntax calls for an URL (or URI), it's a protocol
>similar to "http:" or "mailto:".

Actually, a pseudo-protocol. It's not officially defined and
registered as a URL scheme, see
http://www.w3.org/Addressing/schemes.html

The practical side of the matter is that a page using that pseudo-URL
in links fails miserably when JavaScript is disabled, and even on some
JavaScript-enabled browsers which don't support that hack.

So it's best to use other approaches, such as a valid URL in HREF,
with JavaScript code associated with ONCLICK and other event
attributes. For an example, see the discussion at
http://www.hut.fi/u/jkorpela/forms/javascript.html#window

See also
http://www.irt.org/articles/js169/index.htm#4.12
--
Yucca, http://www.hut.fi/u/jkorpela/
To join the Clueless Club, send a followup to this message
quoting everything up to and including this sig!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.