W3C home > Mailing lists > Public > www-validator@w3.org > June 2003

Problem Validating SCRIPT Element with TYPE Attribute

From: Alden A. Spafford <webmaster@www.aspafford.net>
Date: Sat, 21 Jun 2003 00:13:07 -0700
To: www-validator@w3.org
Message-Id: <20030621071307.M56898@www.aspafford.net>

I tried to validate the page http://sfleathercalendar.org/frmonbar and did not
succeed until I changed the SCRIPT statement.

Originally, the statement was
  <script LANGUAGE=JavaScript>
which did not pass validation because the attribute TYPE was omitted.

When I changed the statement to
  <script TYPE=JavaScript>
it passed validation but the variables in the JavaScript routine were
undefined and caused browser errors when they were used with both Netscape
6.02 and Internet Explorer 5.5.

When I tried this statement
  <script LANGUAGE=JavaScript TYPE=JavaScript>
the JavaScript variables in the routine were undefined and caused errors with
the browsers.

The compromise I came up with was this
  <script LANGUAGE=JavaScript TYPE="">
which is the current statement on the website.  This passes validation and the
variables work with Netscape and Internet Explorer.  Of course, this just
fakes out the validator.  

I know that the LANGUAGE attribute has been deprecated in favor of TYPE.  
(See http://www.w3.org/TR/html401/interact/scripts.html.)
But the Netscape and Internet Explorer browsers don't recognize TYPE.

What is the solution to this?  Do you have any influence with the developers
of these browsers?

Alden Spafford
Oakland, CA
Received on Saturday, 21 June 2003 03:16:36 GMT

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