Closed Bug 88604 Opened 23 years ago Closed 21 years ago

mil.se - Javascript menus not working

Categories

(Tech Evangelism Graveyard :: Other, defect, P4)

defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: daniel.perup, Unassigned)

References

()

Details

(Whiteboard: [LAYER])

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) Gecko/20010630
BuildID:    

The menus at the top of the page http://www2.mil.se/?lang=eng 
("Contents", "Organization", "Other languages" and "Points of contact") should
display a drop down menu when clicked. As of now, the URL changes, but no menu
appears. The menus work as expected in Netscape 4.75.

A quick look at the html source suggests it might be a problem on their side
with detecting Netscape clients. 

Reproducible: Always

Steps to Reproduce:
1.Load the page http://www2.mil.se/?lang=eng
2.Click a menuitem at the top, for example "Contents".
3.Note that no drop down menu appears, but the URL adds an #.
daniel.perup@swipnet.se: you are correct; it is bad browser detection.
The HTML at the site uses this file to do browser-sniffing:

               http://www2.mil.se/layerLib.js

Specifically:


// Browser and OS detection
var ns, ie, mac, objRef;

var pageLoaded=false;

function initLayerLib() {
  if (document.all) ie=true; else ie=false;
  if (document.layers) ns=true; 
  else ns=false;
  if (navigator.userAgent.indexOf("Mac")>0) mac=true; else mac=false;
  //objRef=new Array();
  pageLoaded=true;
}


Notice that "ns" will evaluate to false in Mozilla, because 
layers are no longer supported. See bug 50711 for more info.
The rest of the JavaScript and HTML at the site is like this:


function showMenu(menunr) {
    if (allowOpen==true){   
        var tempMenu
            if (openMenu!= null){
                tempMenu = "meny" +openMenu
                        if (ie){
                          document.all[tempMenu].style.visibility = "hidden"
                        }
                        if (ns){
                          document[tempMenu].visibility = "hide"
                        }
            }

            openMenu = menunr
            tempMenu = "meny" +menunr

            if (ie){
                document.all[tempMenu].style.visibility = "visible"
            }
            if (ns){
                document[tempMenu].visibility  = "show"
            }
}



Since "ie" and "ns" both evaluate to false in Mozilla, 
none of this code executes -
Reassigning to Evangelism component - 
Assignee: rogerl → bclary
Status: UNCONFIRMED → NEW
Component: Javascript Engine → Evangelism
Ever confirmed: true
OS: Linux → All
QA Contact: pschwartau → zach
Hardware: PC → All
Summary: Javascript menus not working → [LAYER]Javascript menus not working
Using: M 0.9.2 Build Id: 2001062815

Another page with badly rendered javascript menus is:

http://www.wimbledon.com/scores/cmatch/11ws.html

Also true for every page on the www.wimbledon.com website. Problem with only one
menu item, "Interactive" on all pages.

After moving the mouse over the "Interactive" menu item, the menu refuses to go
away even when another item is clicked. This could be a mistake with the
rendering engine or the code, it works fine with IE. 
-> Intl team
Assignee: bclary → nitot
QA Contact: zach → momoi
Component: Evangelism → European
Product: Browser → Tech Evangelism
Version: other → unspecified
Moving to new component "West Europe".  European component is being removed. 
See bug 95808 for details.
Component: European → West Europe
QA Contact: momoi → caillon
Summary: [LAYER]Javascript menus not working → mil.se - Javascript menus not working
Whiteboard: [LAYER]
Put priority at 4.
NS 6.2 2001092905094.
Priority: -- → P4
Blocks: 113492
No longer blocks: 113492
http://www2.mil.se/meny.js

Fixed
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Minor problem still exists:
When the popup menu is open, it will close if you move the mouse left, right, or
down; but if you move the mouse up, the menu does not close.
2002022703/WinXP
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Brant: that's because you need to leave the layer, not the menu entry. But, is
this really a cause to keep this bug open?
I think this should be marked as fixed too, anyone ?
Because the Contents and Point of Contact menus cover content although
minimally, I think it is valid.  If content was not covered, I would say fixed,
but since they cover content something should be done.
move...
Component: Europe: West → Other
other default owner
Assignee: nitot → other
Status: REOPENED → NEW
QA Contact: z-caillon-obsolete2 → other
I can't see the problem with the dropdown menu that's described in comment #8.
Camino 2003090802 Mac OS 10.1.5. Maybe they've fixed it?
Agree to comment #14. WFM on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.4) Gecko/20030624. Time to close!
Status: NEW → RESOLVED
Closed: 23 years ago21 years ago
Resolution: --- → WORKSFORME
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.