Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > The "undefined" value

Reply
Thread Tools

The "undefined" value

 
 
Matt Kruse
Guest
Posts: n/a
 
      11-19-2005
Luke Matuszewski wrote:
> Generally you are right, but i think i mentioned JavaScript 1.3
> because JavaScript 1.2 had a terrible bug in operators == and != which
> performed strict equality/inequality.


I don't remember the facts exactly and I don't have time to look it up right
now...

But I thought that there was some confusion about this functionality when
1.2 was coming out. Originally, they decided that == and != should behave
like === and !==. Netscape 4 was released during this time, and since it
wasn't finalized, they decided to only implement this functionality inside
of <script language="Javascript1.2"> tags. After the release, the decision
was reversed so that == and != did _not_ function like the current === and
!==, so the only situation affected was NN4 inside of <script
language="Javascript1.2"> tags.

I may remember wrong, though. Please correct me if so

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com


 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      11-19-2005
Luke Matuszewski wrote:

> Thomas 'PointedEars' Lahn wrote:
>> > (and we remember that JavaScript 1.3 was comformant to ECMAScript 1rd

^^^
>> > release).

>>
>> False.
>>
>> ,-<URL:http://research.nihonsoft.org/javascript/ClientGuideJS13/intro.html#1013678>
>> |
>> | JavaScript 1.1 ECMA-262 is based on JavaScript 1.1.

^^^
>> That is a completely different thing, as tests have shown.

> Generally you are right, [...]


I'm sorry, somehow I read "1.3" where there was "1.1" and vice-versa.

,-<URL:http://research.nihonsoft.org/javascript/ClientGuideJS13/intro.html#1013678>
|
| JavaScript 1.3 | JavaScript 1.3 is fully compatible with ECMA-262. [...]

I'd say that confirms your statement. My bad.


PointedEars
 
Reply With Quote
 
 
 
 
Luke Matuszewski
Guest
Posts: n/a
 
      11-20-2005

Matt Kruse napisal(a):
> After the release, the decision
> was reversed so that == and != did _not_ function like the current === and
> !==, so the only situation affected was NN4 inside of <script
> language="Javascript1.2"> tags.
>
> I may remember wrong, though. Please correct me if so


You are right. It is even mentioned on page with Rhino implementation.
Here is a link:
http://www.mozilla.org/rhino/overview.html - go to the "JavaScript
Language Versions" paragraph.

Best regards.
Luke.

 
Reply With Quote
 
matty
Guest
Posts: n/a
 
      11-20-2005

Luke Matuszewski wrote:
> Matt Kruse napisal(a):
> > After the release, the decision
> > was reversed so that == and != did _not_ function like the current === and
> > !==, so the only situation affected was NN4 inside of <script
> > language="Javascript1.2"> tags.
> >
> > I may remember wrong, though. Please correct me if so

>
> You are right. It is even mentioned on page with Rhino implementation.
> Here is a link:
> http://www.mozilla.org/rhino/overview.html - go to the "JavaScript
> Language Versions" paragraph.
>
> Best regards.
> Luke.


Ha! I couldn't remember where I saw an official (official is to be
debated, I know) website tell me that I had to use
"language='Javascript1.2" and that's where it was !

So what's the deal? From what I understand we should use
"type=text/javascript" and not the "language=...". Is there a clear
explanation on an official website (i.e. not related to a particular
product) that tells me what to do with this ?

Matty

 
Reply With Quote
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      11-20-2005
matty wrote:

> Luke Matuszewski wrote:
>> http://www.mozilla.org/rhino/overview.html - go to the "JavaScript
>> Language Versions" paragraph.
>> [...]

>
> Ha! I couldn't remember where I saw an official (official
> is to be debated, I know) website tell me that I had to use
> "language='Javascript1.2"


The document referred to does not tell you this.

> and that's where it was !
>
> So what's the deal? From what I understand we should use
> "type=text/javascript" and not the "language=...". Is there a clear
> explanation on an official website (i.e. not related to a particular
> product) that tells me what to do with this ?


They already are (implicitly) telling you _not_ to use it.


PointedEars
 
Reply With Quote
 
matty
Guest
Posts: n/a
 
      11-20-2005

Thomas 'PointedEars' Lahn wrote:
> matty wrote:
>
> > Luke Matuszewski wrote:
> >> http://www.mozilla.org/rhino/overview.html - go to the "JavaScript
> >> Language Versions" paragraph.
> >> [...]

> >
> > Ha! I couldn't remember where I saw an official (official
> > is to be debated, I know) website tell me that I had to use
> > "language='Javascript1.2"

>
> The document referred to does not tell you this.
>
> > and that's where it was !
> >
> > So what's the deal? From what I understand we should use
> > "type=text/javascript" and not the "language=...". Is there a clear
> > explanation on an official website (i.e. not related to a particular
> > product) that tells me what to do with this ?

>
> They already are (implicitly) telling you _not_ to use it.


I must be a complete moron but when I read:

<quote>
Some behavior in the JavaScript engine is dependent on the language
version. In browser embeddings, this language version is selected using
the LANGUAGE attribute of the SCRIPT tag with values such as
"JavaScript1.2".
</quote>

Then I understand "to use this particular engine you must specify
"Javascript1.2" in the script tag"

It's okay to tell me that i'm a complete moron.

Matty.

 
Reply With Quote
 
Randy Webb
Guest
Posts: n/a
 
      11-20-2005
Thomas 'PointedEars' Lahn said the following on 11/20/2005 12:11 AM:
> matty wrote:
>
>
>>Luke Matuszewski wrote:
>>
>>>http://www.mozilla.org/rhino/overview.html - go to the "JavaScript
>>> Language Versions" paragraph.
>>>[...]

>>
>>Ha! I couldn't remember where I saw an official (official
>>is to be debated, I know) website tell me that I had to use
>>"language='Javascript1.2"

>
>
> The document referred to does not tell you this.
>


It does, just not directly.

>
>>and that's where it was !
>>
>>So what's the deal? From what I understand we should use
>>"type=text/javascript" and not the "language=...". Is there a clear
>>explanation on an official website (i.e. not related to a particular
>>product) that tells me what to do with this ?

>
>
> They already are (implicitly) telling you _not_ to use it.


Nonsense. Whether you use it or not depends on the behavior you want.
But to be in a position to decide the answer to that question, you have
to understand the consequences of that action and if you truly
understand the consequences, then the question becomes moot.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
 
Reply With Quote
 
Randy Webb
Guest
Posts: n/a
 
      11-20-2005
matty said the following on 11/20/2005 12:33 AM:

> Thomas 'PointedEars' Lahn wrote:


<snip>

>
>>They already are (implicitly) telling you _not_ to use it.

>
>
> I must be a complete moron but when I read:


You are not the moron.

> <quote>
> Some behavior in the JavaScript engine is dependent on the language
> version. In browser embeddings, this language version is selected using
> the LANGUAGE attribute of the SCRIPT tag with values such as
> "JavaScript1.2".
> </quote>
>
> Then I understand "to use this particular engine you must specify
> "Javascript1.2" in the script tag"


And whether you use that language attribute or not will be dependent on
what behavior you are looking for. But to understand that behavior, and
whether you want it or not, you have to understand the behaviors
themselves. And once you understand them, the question becomes moot.

The W3C tells you to use the type attribute (but I have never cared what
W3C or ECMA say), but use the type attribute because it removes the
language attribute differences/behaviors from certain browsers.

> It's okay to tell me that i'm a complete moron.


If it comes from Thomas, don't believe anything he says until you see it
and understand it for yourself. He seems to think he is some kind of
Einstein/NetCop but he's a complete idiot in that regards.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
 
Reply With Quote
 
matty
Guest
Posts: n/a
 
      11-20-2005
> >
> > I must be a complete moron but when I read:

>
> You are not the moron.


Thanks

> And whether you use that language attribute or not will be dependent on
> what behavior you are looking for. But to understand that behavior, and
> whether you want it or not, you have to understand the behaviors
> themselves. And once you understand them, the question becomes moot.


No. The question is not moot. The question is: a MAJOR website is
telling me that I should use the "language="javascriptx.x" to expect a
specific behavior. 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). So yes, I am confused.

>
> The W3C tells you to use the type attribute (but I have never cared what
> W3C or ECMA say)


Why not? Aren't they supposed to be the standard? What do you care
about?
> > It's okay to tell me that i'm a complete moron.

>
> If it comes from Thomas, don't believe anything he says until you see it
> and understand it for yourself. He seems to think he is some kind of
> Einstein/NetCop but he's a complete idiot in that regards.


I disagree with his overall attitude in treating most of the posters as
total morons, but respect his knowledge and I have learned a lot by
reading him.

Matty.

 
Reply With Quote
 
matty
Guest
Posts: n/a
 
      11-20-2005
> > They already are (implicitly) telling you _not_ to use it.
>
> Nonsense. Whether you use it or not depends on the behavior you want.


The original question was if those constructs were legit. Is it a
"standard" to use the "Javascript1.2" construct or not.

> But to be in a position to decide the answer to that question, you have
> to understand the consequences of that action and if you truly
> understand the consequences, then the question becomes moot.


Maybe it's because people do not understand the consequences that they
ask questions in the first place.

Matty.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how this is calculated "BW Util has exceeded the threshold value of 60%,The present value is 62% -" philip007 Cisco 1 01-31-2006 03:09 PM
The value of MCSD: added value to a degree? uv2003 MCSD 4 06-23-2005 05:41 AM
DataView Find method - Error: Expecting 2 value(s) for the key being indexed, but received 3 value(s) Zenobia ASP .Net 2 06-23-2004 05:15 PM
RE: Textbox postback putting value,value =?Utf-8?B?QW5hY2hvc3RpYw==?= ASP .Net 1 06-21-2004 10:50 AM
copying value of DDL in a Datagrid "pre-edit command" to value in "post edit command" San Diego Guy ASP .Net 0 08-07-2003 08:59 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57