Results 1 to 5 of 5

Thread: Drop Down Menu Issue

  1. #1
    Join Date
    Apr 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Drop Down Menu Issue

    Hi, I've been trying to use the Anylink Drop Down Menu to make a layered dropdown and it seemed to work great when I used it on a blank page to test it out. IT worked fine in both IE and Firefox.

    Then I added it to the page that I want to use it on (with content) and for some reason it didn't work the same in Firefox, but it still worked great in IE. In FF, the first time the page loads it works like normal, but if you refresh the page it won't show the menu when I hover over the button. And when I check the JS console it gives the error

    "document has no properties"

    and when I click on that error, it hilights the code

    Code:
    var ie4=document.all
    var ns6=document.getElementById&&!document.all
    From within the script. I've tried everything and I can't firgure it out. I just copy and pasted the code exactly and didn't change anything, and I still get the same thing. Can some one help? Thanks in advance!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I cannot duplicate this behavior using FF1.0.2 in windows XP on the demo. Are you using a Mac? If not, could you please post a link to the problem page?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Apr 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry for the late reply, the file was on my home computer and I didn't upload it until just now. Here's the link: http://salmoneus.net/test/ff-problem.html.

    The menu that's causing the problems is at the top of the page, right above the iframe and I've tried everything that I can think of to fix it. Any help would be great!

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I didn't get the error you describe and the menu behaves the same in IE6 and FF1.0.2. It drops down but, clicking on it does nothing in either browser. I do get an error in FF depending upon how far down the list I hover my pointer:

    Error: b has no properties
    Source File: file:///C:/webwork/side/agility/agility.htm
    Line: 131

    That could be eliminated at least one of two ways. But, it doesn't seem to effect the performance of the menu which, as I said, is limited in either browser. Refreshing the page makes no difference. Here is the code that could be changed:
    Code:
    function contains_ns6(a, b) {
    while (b.parentNode)
    if ((b = b.parentNode) == a)
    return true;
    return false;
    }
    just doing a check for b will fix or at least eliminate the error:

    Code:
    function contains_ns6(a, b) {
    if (b){
    while (b.parentNode)
    if ((b = b.parentNode) == a)
    return true;
    return false;
    }
    }
    I'm not giving up on this yet but, I don't see what the menu is supposed to do. I mean, I can guess there are other 'calculators' to come but, without anything for the menu to do, it is hard to see if it is doing anything. If it acts differently for you, let me know.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Apr 2005
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    It's fixed! :P It's amazing that you pointed that out, I thought it had something to do with the error I was getting before. But if that didn't have anything to do with the problem I was getting... well there was a browser update an hour ago for Firefox, could that have fixed it?

    The reason the menu didn't have any links was because I had just put a quick image I made before to test it out with, but you're right that there are going to be more calculators. The links are going to open up in the iframe and I thought that a drop down menu would add a cool effect. Thanks again for your help!

Bookmarks

Posting Permissions

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