Richard Cornford wrote:[color=blue]
> "Randy Webb" <hikksnotathome@aol.com> wrote in message
> news:WqOdneeSTrZSLbbdRVn_iw@comcast.com...
> <snip>
>[color=green]
>><script language="javascript1.2">
>>a = 30;
>>b = 40;
>>if (a = b){
>>alert('They are equal')
>>}
>>else{
>>alert('They are not equal')
>>}
>></script>
>>Test the above in Netscape 4.xx, and then any other browser.[/color]
>
>
> It might be best not to do the comparison with IceBrowser as it uses the
> Rhino javascript engine and the docs for Rhino say it will respect
> language="javascript1.2" and use the alternative type-converting rules
> (though I have never tested that, not using the language attribute
> myself anymore).[/color]
Just one more reason *not* to use the language attribute.
[color=blue]
> It is a bit unfair to use the text "They are equal" when the test you
> are performing is an assignment (not comparison), though it adequately
> illustrates the problem.[/color]
In Netscape 4.xx with language="javascript1.2", it does a comparison,
not an assignment. Since they are not equal, it will alert that they are
not equal. In modern browsers then it alerts they are equal because it
can set the assignment, thus its true, so it alerts.
Perhaps:
<script language="javascript1.2">
a = 30;
b = 40;
if (a = b){
alert('I honor it as an assignment')
}
else{
alert('I honor it as a comparison')
}
</script>
Might have been better alerts.
<--snip-->
[color=blue][color=green][color=darkred]
>>>Posted via
http://www.forum4designers.com[/color][/color]
>
> <snip>
>[color=green]
>>You really should get a real newsreader and subscribe to
>>new:comp.lang.javascript and stop using a site that portrays
>>itself as a "private forum" when it is anything but that.[/color]
>
>
> I think that they have abandoned the pretence that they are a private
> forum, though they have done little to dray attention to the reality and
> are maintaining a number of other deceptions related to that original
> one.[/color]
I am not so sure they have. They censor out the part of the posts that
we normally quote/complain about. Namely, the generated signature thats
get posted. When viewing the post on the site, you do not see that
section of the post. But they showed my signature line (and yours as well).
http://www.forum4designers.com/message36240.html
Is this very thread, and if you look at the post that I replied to,
there is no signature on it telling where it was posted from nor the
link to the thread.
[color=blue]
> But they have also stopped fully reporting comp.lang.javascirpt. So,
> with no guarantee that any response made to someone posting from
> forum4designers.com will even be seen there, and knowing that any reply
> made will be garbled by inappropriate presentation, it is questionable
> whether it is worth anyone's effort to compose a worthwhile response to
> posts originating on that site.
>[/color]
And miss out on all this fun? You are kidding me, right? <g>
Actually, they showed this entire thread (so far anyway). Will be
interesting to see if anything from my post after gets "lost" or not.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ -
http://jibbering.com/faq/