Results 1 to 2 of 2

Thread: chainedmenu without "Go" button

  1. #1
    Join Date
    May 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default chainedmenu without "Go" button

    1) Script Title:
    Chined Select Menu
    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...menu/index.htm
    3) Describe problem:
    I'm using chained menus (which works great) but the client doesn't like the Go button and wants to go to the new page on the last selection. I tried copying the button's onclick() info into the last select as an onChange() function but nothing happens.
    TIA, Eric

  2. #2
    Join Date
    May 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I got it to work by using ChainedSelect instead of ChainedMenu. I set the openLink function to the last menu's onchange.

    function openLink(url) {
    if (url != "") {
    location.href = url;
    }
    else {
    alert("Please make a selection.");
    }
    }

    The new page also contains the menu, but sometimes the last menu is not updated properly on the new page. It seems like the cookie is read by the new page before being written by the old page.

    I suspect adding a small delay could help, but when I try, the new page doesn't open anymore. Probably a scripting error on my part. This is what I tried:

    function openLink(url) {
    if (url != "") {
    setTimeout('location.href = url', 250);
    }
    else {
    alert("Please make a selection.");
    }
    }

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
  •