W3C home > Mailing lists > Public > www-html@w3.org > April 1999

Re: here comes the URI

From: John Whelan <whelan@itp.unibe.ch>
Date: Fri, 30 Apr 1999 03:01:56 -0400 (EDT)
To: www-html@w3.org, igjav@ctv.es
Message-id: <199904300701.JAA28298@itpserver>
> Thanks for replies, I assume putting somewhere:
> <a...href="javascript:
> is standard to that level, the html level (still obviously not at scripting
> level, but thet was not the question).

In any event, you shouldn't use it, since it cripples the link for
users without Javascript enabled in their browsers.  You should
instead put the appropriate 'http://' URI as the href attribute (at
least 95% of the uses of the 'javascript:' URI syntax are to open
another page in a jazzed-up window) and add an onclick attribute whose
value is whatever followed the 'javascript:', with ';return false'
tacked onto the end.  It will have the same effect as the
'javascript:' URI syntax for JS-enabled browsers, and also make the
link usable by the rest of the world.

(I know this is off-topic, but if it prevents one person from breaking
another page with the 'javascript:' URI syntax, it'll be worth it.)

					John T. Whelan
Received on Friday, 30 April 1999 03:27:23 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:50 UTC