Re: here comes the URI

> 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
					whelan@iname.com
					http://www.slack.net/~whelan/

Received on Friday, 30 April 1999 03:27:23 UTC