[Javascript] type="javascript1.2" vs language="javascript1.2"
Peter-Paul Koch
gassinaumasis at hotmail.com
Fri Sep 12 01:19:21 CDT 2003
>I've reached a bit of a dilemma while trying to adhere to current web
>standards. The problem being that the language of a script not actually
>having an effect when the type attribute is present in a script tag.
Why do you need language="javascript1.2" in the first place? It is
completely useless.
>Personally, I prefer the testing of methods etc for compatibility e.g.
>"if( !document.getElementsByTagName ) return false;", so the language
>version doesn't really matter (unless you are trying to target a specific
>version of javascript, for instance, Array.splice() returns differently in
>1.2 and 1.3), but for older scripts being used, that don't use method
>testing and rely on the language version of the script tag to provide the
>compatibility, there doesn't appear to be an standard option.
Can you give an example of such a script? Object detection is always
possible, even in the oldest of JavaScripts.
>I can imagine making a quick script to test the browsers javascript
>version,
>and then document.write the javascript1.2 script tag (with external src
>file) to the browser if appropriate, but surely there must be other
>options?
>
>Has anyone delved into this situation before? And better still, has anyone
>got a standards compliant solution for it?
My advice: forget about the "javascript1.2" stuff completely. It'll save you
a lot of headaches. Besides, some very odd things start happening in
Netscape 4 when you specify 1.2
-------------------------------------------------------------------
ppk, freelance web developer
Interaction, copywriting, JavaScript, integration
http://www.xs4all.nl/~ppk/
Column "Keep it Simple": http://www.digital-web.com/columns/keepitsimple/
New: Browser Wars II: The Saga Continues
http://evolt.org/article/rdf/25/60181/
------------------------------------------------------------------
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
More information about the Javascript
mailing list