Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: AnyLink Dropdown Menu

  1. #1
    Join Date
    Jul 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default AnyLink Dropdown Menu

    I am having trouble with the following script: http://www.dynamicdrive.com/dynamici...pmenuindex.htm.

    I was using the script using an i-frame layout, and I guess that could be the problem, but I couldn't figure out a solution. However, it had worked ONCE before, but it had been halfway cut off by another frame. I had tried to fix it and I ended up in my present situation: http://www.freewebs.com/wizardsrealm/indexwine.html.

    If anyone is able to tell me what is wrong exactly and how I can fix it, please let me know.

  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

    Error: unterminated string literal
    Source File: http://www.freewebs.com/wizardsrealm/nav.html
    Line: 36, Column: 9
    Source Code:
    menu2[0]='<a href="new.html">Link</a>

    It should be:


    menu2[0]='<a href="new.html">Link</a>'

    Gotta fix that first, could be other things.
    - John
    ________________________

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

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

    Default

    Ah! I never saw that! Wow, thank you!

    I fixed it as you suggested, but the menu is still not visible.
    Possibly the I-frames?

  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

    Now you have:

    Error: unterminated string literal
    Source File: http://www.freewebs.com/wizardsrealm/nav.html
    Line: 49, Column: 15
    Source Code:
    document.write('<div id="dropmenudiv"

    The fix for this is just a little more complicated, it is actually written correctly except that the lines in the code are broken up:
    Code:
    document.write('<div id="dropmenudiv" 
    style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" 
    onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
    should be:
    Code:
    document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
    Once again, there could be other things, gotta fix this first to tell. BTW do you have Firefox or NS7.2? With either one of those browsers you could use the javascript console to debug this, just as I have been doing.
    - John
    ________________________

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

  5. #5
    Join Date
    Jul 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No, sadly. I have Microsoft Internet Explorer....
    I'm sorry for all the errors. ><

  6. #6
    Join Date
    Jul 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Oh! It works now! Thank you very much!
    Now I have to fix it so it isn't covered by the frame... >< Do you have any quick suggestions?

  7. #7
    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

    Well, a quick suggestion would be to use 1 less link item per drop down, that way the drop downs might fit in the frame they are in. They've become drop ups though because there isn't enough room in the frame for them to drop down from their present location. I'd also try positioning them at the top of the image map. I'd at least want to see if that helped. There are other problems. In both IE6 and FF, the only way I know to look for a menu is that you told me that there was one. Otherwise, I'd never see it. Once I get a drop down, there is nothing on it unless I hover over it.
    - John
    ________________________

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

  8. #8
    Join Date
    Jul 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you for your suggestion and help!

  9. #9
    Join Date
    Jul 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I fixed it so that the navigation is more obvious, but I'm unable to posititon the menu correctly...
    I looked at other threads, but they only show how to move the menu to the right and I wish to move my menu up.

  10. #10
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    #dropmenudiv{
    position:absolute;
    top:15px;
    border:1px solid black;
    font:normal 12px Verdana;
    line-height:18px;
    z-index:100;
    }
    ... where 15px is the distance from the top of the page.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •