Drop Down Menus Don't Work in Firefox

Discussion in 'Firefox' started by Sam Bench, Dec 9, 2006.

  1. Sam Bench

    Sam Bench Guest

    I took over a church web site and discovered a problem. The site was
    designed for IE and works well with IE. It uses drop down menus triggered
    by an image map. The menus are stored in a server side include. I just
    discovered that the menus don't operate in Firefox or Opera. This is a
    problem I need to fix since the site is inaccessible to people using those
    browsers. The address for the site is: http://www.norwinalliance.org/

    Any ideas on how to get the menus to work in Firefox would be greatly
    appreciated.
     
    Sam Bench, Dec 9, 2006
    #1
    1. Advertisements

  2. When I opened that site via the Firefox IE Tab extension
    (https://addons.mozilla.org/firefox/1419/), the desired menus were
    found, and usable.
     
    Manatee Memories, Dec 9, 2006
    #2
    1. Advertisements

  3. Sam Bench

    Vangard Guest

    When I opened that site via the Firefox IE Tab extension
    Doesn't seem to work without it though.

    I would suggest to the original poster to just rewrite the page without the pull down menus, they're not necessary, just keep it simple.
     
    Vangard, Dec 9, 2006
    #3
  4. Or he could use javascript pull downs, since the problem seems to be
    with the image map.

    Lee
     
    Leonidas Jones, Dec 10, 2006
    #4
  5. Sam Bench

    Ralph Fox Guest

    The javascript code needs a very small amount of updating.

    Here is what to change in the source code for the home page.
    For the other pages, the changes appear to be very similar.

    Open the HTML source code in a plain text editor, and make these
    two changes

    1. Between the old lines 74 and 75, add a new line
    var W3CDOM = (document.getElementById ? 1 : 0);
    as shown below, so that the HTML source code
    will now look like this.

    ~~~~~~~~~~NEW VERSION~~~~~~~~~~
    <SCRIPT language=javascript>
    <!--
    window.onerror = null;
    var W3CDOM = (document.getElementById ? 1 : 0);
    var bName = navigator.appName;
    var bVer = parseInt(navigator.appVersion);
    var NS4 = (bName == "Netscape" && bVer >= 4);
    var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
    var NS3 = (bName == "Netscape" && bVer < 4);
    var IE3 = (bName == "Microsoft Internet Explorer" && bVer < 4);
    ~~~~~~~~~~NEW VERSION~~~~~~~~~~

    2. Modify the javscript functions showlayer() and hidelayer()
    on old lines 97-116 as shown below (new lines 98-125)

    ~~~~~~~~~~OLD VERSION~~~~~~~~~~
    // SHOW MENU
    function showLayer(layerName){
    if (NS4 || IE4) {
    if (timeOn != null) {
    clearTimeout(timeOn)
    hideLayer(onLayer)
    }
    if (NS4 || IE4) {
    eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
    }
    onLayer = layerName
    }
    }// HIDE MENU
    function hideLayer(layerName){
    if (menuActive == 0) {
    if (NS4 || IE4) {
    eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
    }
    }
    }// TIMER FOR BUTTON MOUSE OUT
    ~~~~~~~~~~OLD VERSION~~~~~~~~~~

    ~~~~~~~~~~NEW VERSION~~~~~~~~~~
    // SHOW MENU
    function showLayer(layerName){
    if (W3CDOM || NS4 || IE4) {
    if (timeOn != null) {
    clearTimeout(timeOn)
    hideLayer(onLayer)
    }
    if ( W3CDOM ) {
    document.getElementById(layerName).style.visibility="visible";
    }
    else
    if (NS4 || IE4) {
    eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
    }
    onLayer = layerName
    }
    }// HIDE MENU
    function hideLayer(layerName){
    if (menuActive == 0) {
    if ( W3CDOM ) {
    document.getElementById(layerName).style.visibility="hidden";
    }
    else
    if (NS4 || IE4) {
    eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
    }
    }
    }// TIMER FOR BUTTON MOUSE OUT
    ~~~~~~~~~~NEW VERSION~~~~~~~~~~
     
    Ralph Fox, Dec 10, 2006
    #5
  6. Sam Bench

    Sam Bench Guest

    Thanks for the input. How can you tell that the problem is with the image
    map?
     
    Sam Bench, Dec 10, 2006
    #6
  7. Sam Bench

    Sam Bench Guest

    Ralph,

    It worked!! Thank you very much. I was about to junk the whole site and
    start over again because of the menu problem in Firefox and Opera. You are
    a lifesaver!!


     
    Sam Bench, Dec 12, 2006
    #7
  8. Sam Bench

    Ralph Fox Guest


    You're welcome.
     
    Ralph Fox, Dec 12, 2006
    #8
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.