Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003

    * Layered Menu Issue

    Hi, I'm trying to make a layered drop-down menu (sorta like the 1 at the top of the page, but not exactly) with some JavaScript but I'm having a problem with it. The way the script works is that when you mouse over the button, a menu appears under it with links to other pages. It works fine in IE, but it doesn't work as well in Firefox.

    The first time I load the page in FF it works fine, but if the page gets reloaded the menu doesn't appear. In the JS Console within the browser it gives the error:
    document has no properties
    and clicking on the error message hilights this part of the code:
    var ie4=document.all
    var ns6=document.getElementById&&!document.all
    I've tried everything and I have no idea what to do. And the even stranger thing is that the first time I used the script on a blank page with just the <head> and <body> tags it worked fine in both browsers. As soon as I added it to the page that I'm actually going to use it on, the script got messed up. I didn't change anything when I put it on the second page so I'm not sure what happened... Can anyone help? Thanks in advance!

  2. #2
    var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
      if (isInternetExplorer)
        var someVar= document.all.someObject;
        var someVar = document.getElementById("someObject");

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts