Results 1 to 3 of 3

Thread: AnyLink Drop Down Menu bug in IE?

  1. #1
    Join Date
    Oct 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default AnyLink Drop Down Menu bug in IE?

    Script: AnyLink Drop Down Menu
    http://www.dynamicdrive.com/dynamici...pmenuindex.htm

    --------------------

    I am having problem with the script when I have a form drop down list right below the top level menu where the drop down menu would normally "drop down." The html form drop down menu would stack up in front of the AnyLink drop down menu items that is in that position. I only have this problem in IE but not in Firefox (haven't tested it in Opera yet).

    To better illustrate the problem, I have created a simple website that recreates the problem below:

    http://markets.acmeanalytics.com/~alextan/

    I couldn't figure out how to correct this problem, so any help would be appreciated. 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

    Don't put the select so close to the menu. Or hide it when the menu drops down - put this:
    Code:
    if (ie4){
    selects=['sel1', 'sel2']
    sels=ie4.tags('select')
    for (var i_tem = 0; i_tem < sels.length; i_tem++){
    for (var j_tem = 0; j_tem < selects.length; j_tem++)
    if (sels[i_tem].id==selects[j_tem])
    sels[i_tem].style.visibility='hidden'
    }
    }
    right after this:
    Code:
    function dropdownmenu(obj, e, menucontents, menuwidth){
    and this:
    Code:
    if (ie4){
    for (var i_tem = 0; i_tem < sels.length; i_tem++){
    for (var j_tem = 0; j_tem < selects.length; j_tem++)
    if (sels[i_tem].id==selects[j_tem])
    sels[i_tem].style.visibility='visible'
    }
    }
    right after this:
    Code:
    function hidemenu(e){
    This line is where you configure the ids to use (they can be the existing selects id's if they have them):

    selects=['sel1', 'sel2']

    If they don't have them, give your select(s) ids:
    HTML Code:
    <select id="sel1" name="select">
    If you only have one select, you still need two ids configured in:

    selects=['sel1', 'sel2']

    for it to work, the second one can be a dummy. You can add as many id's as you need:

    selects=['sel1', 'sel2', 'sel3', 'sel4']
    - John
    ________________________

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

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

    Default Thanks a lot!

    Hi John,

    The codes you gave me to work around the problem was very helpful. I really appreciate you taking the time to lay it out for me.

    Again, thanks a lot!

    Alex

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
  •