RE: Validation Question for Javascript type attribute

> <SCRIPT LANGUAGE="JAVASCRIPT" TYPE="text/javascript"
> SRC="../util/APIWrapper.js"></SCRIPT>
> <SCRIPT LANGUAGE="JAVASCRIPT" TYPE="text/javascript"
> SRC="../util/SCOFunctions.js"></SCRIPT>
>
> When I then attempted to check for Target Browsers, I get the follow
> message: " the type attribute of the Script tag is not supported." This
> message appeared when I checked it the following browsers: Netscape
> Navigator 4.0 - 6.0, Internet Explorer 3.0 - 6.0, Opera 4.0 - 6.0.

A few things are going on here.

1. Some of those browsers don't support "type" because they were made before
the type attribute was used with the <script> element.
2. Some of those browsers don't support "type" because of what should be
considered a bug.

In both those cases the type attribute does no harm.

3. Your validator is buggy as some of the above browsers do support the type
attribute. If it's calling telling you browser stuff goes on "validation"
I'm not surprised it's buggy. I know that type has been supported in IE for
some time now (version 4 IIRC).

Apart from that the only problems I see are:

Use of the "language" attribute is deprecated. It is invalid if you are
using one of the strict DTDs, but valid if using one of the transitional
DTDs.

You are using upper case for the element and attribute names. This is valid
if you are using an old version of HTML like HTML4.01 or earlier, but
invalid if you are using the current version of HTML (XHTML).

Received on Thursday, 24 October 2002 11:40:15 UTC