Re: The "undefined" value
- From: Lasse Reichstein Nielsen <lrn@xxxxxxxxxx>
- Date: Sun, 20 Nov 2005 13:36:02 +0100
"matty" <unlimitedbro@xxxxxxxxx> writes:
> The question is: a MAJOR website is telling me that I should use the
> "language="javascriptx.x" to expect a specific behavior.
They are saying that *if* you need a specific behavior (which almost
always means like JavaScript 1.2), *then* you have to use the language
attribute.
They are not telling you not to use the "type" attribute (as well they
shouldn't, since it is mandatory for W3C standard compliant HTML).
They are perhaps also forgetting to tell you that the language
attribute trick only works in browsers that support more than one
dialect of JavaScript, and not just the most recent version of
ECMAScript. The browsers supporting multiple dialects include Netscape
4 (and earlier) and Mozilla based browsers. Maybe there are more, but
other major browsers like IE and Opera are not among them.
That means that depending on a specific older versions' behavior will
break on pages used on the internet, if viewed in IE or Opera.
This is why people in this group recommends not using the language
attribute at all. The only effect you can get from using it is to
allow scripts that will break anyway.
Also, the most common use of it that we observe is people writing
language="JavaScript1.2" *without* knowing that it selects a different
interpretation of the script in *some* browsers, or what the difference
is. So unless a person can argue exactly why he needs it and that he
knows what he's doing, it's recommended that he avoids using the
"language" attribute.
> People here tell me that I shouldn't follow the rules of the MAJOR
> website (my MAJOR I mean a website like Mozilla, which is supposedly
> following the standards).
The Mozilla page, which I haven't read recently, is probably doing its
job: documenting the behavior of Mozilla. And indeed, if you want
Mozilla to select a different dialect of Javascript, this is the way
to do it.
We are telling you that you don't want to want that. :)
/L
--
Lasse Reichstein Nielsen - lrn@xxxxxxxxxx
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
.
- Follow-Ups:
- Re: The "undefined" value
- From: Luke Matuszewski
- Re: The "undefined" value
- References:
- The "undefined" value
- From: matty
- Re: The "undefined" value
- From: Luke Matuszewski
- Re: The "undefined" value
- From: Thomas 'PointedEars' Lahn
- Re: The "undefined" value
- From: Luke Matuszewski
- Re: The "undefined" value
- From: Matt Kruse
- Re: The "undefined" value
- From: Luke Matuszewski
- Re: The "undefined" value
- From: matty
- Re: The "undefined" value
- From: Thomas 'PointedEars' Lahn
- Re: The "undefined" value
- From: matty
- Re: The "undefined" value
- From: Randy Webb
- Re: The "undefined" value
- From: matty
- The "undefined" value
- Prev by Date: Re: newbie question about regular expressions
- Next by Date: Re: The "undefined" value
- Previous by thread: Re: The "undefined" value
- Next by thread: Re: The "undefined" value
- Index(es):
Relevant Pages
|