Closed
Bug 160440
Opened 23 years ago
Closed 22 years ago
aoltw.com blocks rollovers on Netscape/Moz. Also: uses 08, 09 instead of 8/9
Categories
(Tech Evangelism Graveyard :: English US, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: susiew)
References
()
Details
Warning: 08 is not a legal ECMA-262 octal constant
Source File: http://www.aoltw.com/noflash.adp
Line: 117, Column: 7
Source Code:
months[08]="August";
Warning: 09 is not a legal ECMA-262 octal constant
Source File: http://www.aoltw.com/noflash.adp
Line: 118, Column: 7
Source Code:
months[09]="September";
Error: site_map_over has no properties
Source File: http://www.aoltw.com/noflash.adp
Line: 81
Warning: 08 is not a legal ECMA-262 octal constant
Source File: http://www.aoltw.com/site_map.adp
Line: 116, Column: 7
Source Code:
months[08]="August";
Warning: 09 is not a legal ECMA-262 octal constant
Source File: http://www.aoltw.com/site_map.adp
Line: 117, Column: 7
Source Code:
months[09]="September";
Error: site_map_over has no properties
Source File: http://www.aoltw.com/site_map.adp
Line: 80
Error: site_map_off has no properties
Source File: http://www.aoltw.com/site_map.adp
Line: 85
Warning: 08 is not a legal ECMA-262 octal constant
Source File: http://aoltimewarner.search.aol.com/searchresults.adp?query=jobs
Line: 116, Column: 7
Source Code:
months[08]="August";
Warning: 09 is not a legal ECMA-262 octal constant
Source File: http://aoltimewarner.search.aol.com/searchresults.adp?query=jobs
Line: 117, Column: 7
Source Code:
months[09]="September";
Comment 1•23 years ago
|
||
happens on the flash page
cc: susie
Assignee | ||
Comment 2•23 years ago
|
||
I know the people who manage this site so will get a contact.
Can you first please tell me the problem that results from this incompatible
code? It all seems to WFM on Win2k with recent builds.
well the 08/09 stuff should just be fixed, in js 011 means 9, 017 means 15, and
08/09 aren't valid numbers.
as for the other thing, um... i had no idea what it was for, i didn't look, but
presumably something failed so some glitz failed.
a quick inspection indicates it was probably a mouseout from the sitemap
function off(imgName) {
if (document.images) {
document[imgName].src = eval(imgName + "_off.src");
}
}
i don't like the code style here, cc for ideas/suggestions.
ok, here's what's happening
var nstest = false;
if (!document.all && document.getElementById) {
nstest = true;
}
//moz: nstest==true
we've seen off, it doesn't check for nstest==true, so it accesses things which
don't exist. it can know better. i'm only using mozilla so i don't know what the
author was doing for the other cases, but basically it looks like we don't get
mouseout's because that code fork was never written.
Assignee: doron → susiew
Assignee | ||
Comment 4•23 years ago
|
||
Hi - Can you please describe in terms of user experience what the problem was so
they will get why this needs to be fixed? I compared to IE and couldn't tell.
Thanks.
Comment 5•23 years ago
|
||
Note most of what timeless has reported above are warnings. The user
only sees these if he/she has the "Show strict JavaScript warnings"
preference set in Edit > Preferences > Debug.
Warning: 08 is not a legal ECMA-262 octal constant
Source File: http://www.aoltw.com/noflash.adp
Line: 117, Column: 7
Source Code:
months[08]="August";
The explanation for this particular warning: as timeless points out,
if you lead off a number in JS by a 0, it will be interpreted as an
OCTAL number as long as all digits are from 0-7. If any digit exceeds
the octal range, JS assumes the developer intends a decimal number.
It will be interpreted as a decimal number, but a warning will be given
in the JS Console. See http://bugzilla.mozilla.org/show_bug.cgi?id=49233
As timeless says, developers have to be careful about leading off
a number with a 0, and the practice should be avoided unless an
octal number is explicitly desired. Presumably this site just uses
01, 02, ..., 09, 10, 11, 12. This will not cause any errors, just
warnings about 01-09 if the JavaScript strict warnings pref is on.
If, on the other hand, the developers ever were to use 011, this
is a valid octal representation and would be interpreted by JS
as the number 9, NOT 11. This is true in IE as well; just try
this in the URL bar -
javascript: alert(011)
Comment 6•23 years ago
|
||
Correction : I do see the octal warnings in a Mozilla 2002080608
1.0-branch build, even though I do not see Edit > Preferences > Debug
options, as there always are in Mozilla trunk builds.
The other items reported above are more serious, since they are
errors, not warnings:
Error: site_map_over has no properties
Source File: http://www.aoltw.com/noflash.adp
Line: 81
Comment 7•23 years ago
|
||
Here is the reason for the errors:
<script language="JavaScript">
var nstest = false;
if (!document.all && document.getElementById)
nstest = true;
if (document.images && nstest == false)
{
var site_map_over = new Image();
site_map_over.src = "/i/mh_sm_over.gif";
var site_map_off = new Image();
site_map_off.src = "/i/mh_sm.gif";
etc.
etc.
}
In Mozilla/NS6/NS7, the value of |nstest| will be false. But all the
variables like |site_map_over| only get defined if |nstest| is true!
These variables hold references to the rollover images at the site.
In other words, the rollover image effects are deliberately limited
by the site to work in Microsoft browsers and not Netscape/Mozilla.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 8•23 years ago
|
||
User experience is:
Load the site and mouseover the menu at the left:
"corporate information", "corporate citizenship", etc.
In IE6 or NN4.7, whenever you mouseover an item, the arrow
to the left of the item turns white. In Mozilla/N6/N7,
the arrows never turn white. No rollover effects are visible,
and errors collect in the JavaScript Console such as:
Error: site_map_over has no properties
Source File: http://www.aoltw.com/noflash.adp
Line: 81
Summary: aoltw.com uses 08, 09 instead of 8/9 and some dom issue → aoltw.com blocks rollovers on Netscape/Moz. Also: uses 08, 09 instead of 8/9
Comment 9•22 years ago
|
||
no js errors and i have the nice little white arrows->fixed.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•