Re: The "undefined" value



"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.'
.



Relevant Pages

  • Re: Automatically Redirect Users to their Default Language
    ... redirect users to their browsers default language. ... My website has three ...
    (microsoft.public.scripting.vbscript)
  • Re: Netscape and CSS
    ... computer with different browsers and everything looked good, ... I open them on the website, they look fine in IE but neither Mozilla ... and the latter is for unix. ...
    (alt.html)
  • Re: help please
    ... About the browsers used by visitors of my website (italian section) I have the following: ... Mozilla: 10% ...
    (alt.html)
  • Re: Any updates for browser compatability issue in Publisher 2003?
    ... She has Earthlink and is on dial-up. ... and try to do one with the hosting website's website builder. ... save the whole website to the server, publisher stopped responding during the ... your site will load properly in most browsers. ...
    (microsoft.public.publisher.webdesign)
  • Re: Any updates for browser compatability issue in Publisher 2003?
    ... live again but is still not working in Earthlink or Aol. ... and try to do one with the hosting website's website builder. ... your site will load properly in most browsers. ...
    (microsoft.public.publisher.webdesign)