W3C home > Mailing lists > Public > www-validator@w3.org > March 2001

Re: Code: 501 Protocol scheme 'javascript' is not supported

From: Tim Bagot <tsb-w3-validator-0003@earth.li>
Date: Mon, 26 Mar 2001 23:44:16 +0000 (UTC)
To: <www-validator@w3.org>
cc: <shannonb@xilinx.com>
Message-ID: <Pine.LNX.4.30.0103262327030.640-100000@windle.hack>
At 2001-03-22T18:13-0500, Shannon Bristow wrote:-

> I am getting an error message on links to javascript.  To include
> javascript in a page, such as opening a new window, is relatively
> common. Is this really not supported or am I doing something wrong?
>
> Code: 501 Protocol scheme 'javascript' is not supported

It does not mean that the javascript URI scheme is not supported in HTML -
just that it is not supported by the link checker, which does not have a
javascript interpreter, or that it is (unsurprisingly) not supported by a
web proxy being used by the checker. You can use any URI scheme in an HTML
document.  (Though I don't think the javascript scheme has been
registered.)

However, the use of javascript: URIs is almost always unhelpful.  Unless
what is (for example) going to be in the popup window absoutely requires
scripting, consider instead providing an http: (or whatever) URI, and
putting scripting in an onclick attribute. That way, those people with
JavaScript should see the same behaviour but those without it, or who have
it disabled, can still follow the link.


Tim Bagot
Received on Monday, 26 March 2001 18:44:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:13:55 GMT