Closed Bug 134025 Opened 24 years ago Closed 24 years ago

[INCORRECT BROWSER-SNIFFING] JavaScript does not display

Categories

(Tech Evangelism Graveyard :: English US, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: michael.bell, Assigned: arun)

References

()

Details

Attachments

(2 files)

From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020310 BuildID: 2002031008 The middle column of the attached page (badpage.tar.gz) does not display at all. Reproducible: Always Steps to Reproduce: 1.open page 2.notice that the middle column is not displayed 3. Expected Results: The column should be visible
Confirming reported behavior with Mozilla binary 2002032610 WinNT. OS: Linux ---> All. STEPS TO REPRODUCE 1. Save the above attachment locally 2. Decompress it with tar -zxf 3. View it in NN4.7 or IE6 : looks normal 4. View it in Mozilla : the central column is empty In Mozilla we see this error in Tasks > Tools > JavaScript Console: Error: bwsr has no properties Source File: file://(path to)/CpHome_files/cp_std.js Line: 18
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
In the top-level HTML we have this faulty browser-sniffing code: var bwsr; var all; if (navigator.appName.indexOf("Microsoft") >= 0){ bwsr = "IE" ; all = document.all; }else if(isProperty(document.layers)){ bwsr = "NN"; all = document.layers; }else if(navigator.userAgent.indexOf("Netscape6") >= 0){ bwsr = "NN6"; all = document.getElementsByTagName("*"); } The check for Netscape 6 is not the right one for Mozilla. As a result, in Mozilla |bwsr| and |all| are never initialized. This causes the error reported above, and execution ceases. One can confirm this by going into the file cp_std.js and hard-coding the first two lines to: var bwsr = "NN6"; var all = document.getElementsByTagName("*"); Once you do that, the page loads fine. Reassigning to Tech Evangelism -
Assignee: rogerl → aruner
Component: JavaScript Engine → US Ecommerce
Product: Browser → Tech Evangelism
QA Contact: pschwartau → bclary
Summary: javascript does not display → [INCORRECT BROWSER-SNIFFING] JavaScript does not display
Version: other → unspecified
Sorry, the browser-sniffing is not in the top-level HTML, it's in the file cp_std.js, which I will attach. Michael, thank you for zipping up the page for us!
Attached file cp_std.js
I have been in contact with usaa about this. I don't know how things are handled with evangelism, but if the correct browser sniffing code was posted here, I would direct the usaa webmaster to this page. Perhaps he would be more likely to check it out in context.
The correct thing to do would be to look for Gecko rather than Netscape 6. That way any browser that used the Gecko engine would be covered. The best site for this is: http://developer.netscape.com/evangelism/docs/articles/find-gecko/ The easiest thing to do would be: }else if(navigator.userAgent.indexOf("Gecko") Note I sent email to the USAA web people about this a month ago and they ignored me. This seems to be pretty common in the web world.
I got a hold of some people on the phone and hopefully this will get resolved.
This bug is fixed as of last week. Thanks for your help!
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
tech evang june 2003 reorg
Component: US Ecommerce → English US
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: