Results 1 to 3 of 3

Thread: Chained Select Menu for Form POST Data

  1. #1
    Join Date
    Aug 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Chained Select Menu for Form POST Data

    1) Script Title: Chained Select Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/chainedmenu/

    3) Describe problem:

    Hi,

    I'm trying to modify the chained menu's script a bit so that it can be used to submit a form field rather than to go to another page. I know that I can use URL's and GET variables on the receiving page, but POST form data would be much easier.

    Is there a way to submit POST data using the chained menu (I need to submit data from ALL the menu's, every layer).

    Thanks

  2. #2
    Join Date
    Dec 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I need help here as well. I need to use the Chained Select Menu as part of a larger form, so I need it to simply designate a variable value and allow me to post it with the form. I haven't been able to find an answer and don't have the javascript skills to figure it out on my own. Thanks in advance!

  3. #3
    Join Date
    Dec 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    To have each value of each select box post, the blank items in the addList functions of the config.js file need to be datafilled. In the author's example, the third field is usually blank unless it is the list for the last select box in the chain. For example:

    addList("Menu1", "Value1", "", "Submenu1");

    should be changed to:

    addList("Menu1", "Value1", "Value1", "Submenu1");

    Now when the form is posted (either to another page or back to itself) each menu will have a cookie set to the 3rd value of the selection for each select box (here the cookie would be savestate_1=Value1 if this was the first select in the chain).

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
  •