Results 1 to 2 of 2

Thread: Chained select menu with xml??

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

    Question Chained select menu with xml??

    1) Script Title: Chained select menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...menu/index.htm

    3) Describe problem:

    Hi,

    I am very new to xml but I do have experience with Javascript. I am using a chained select menu found at: http://www.dynamicdrive.com/dynamici...menu/index.htm
    as my code. When the first box is selected the second is populated based on the first boxes selection and so on.

    The information populated inside the 3 drop down boxes changes frequently and at the moment I have the text and values hard coded. Is there a way to have the text and values populated based on an xml file?

    I do have the text and values needed to populate all drop down boxes available in an xml file but I do not know how to link the xml file to be the source of the JS drop down boxes.

    addOption("ACCT_MODEL", "VAL_2", "Reports/Account/account+acct_model/5.htm");

    For ex. the "val_2" and "5.htm" is available in an xml file. I just need some help figuring out is I can use the xml as the source to populate each 'addoption'. Any help would be greatly appreciated!!

    -----------------
    Source JS code:

    addOption("ACCT_MODEL", "Select an item", "", 1); //HEADER OPTION
    addOption("ACCT_MODEL", "All Attributes", "Reports/Account/account+acct_model/10.htm");
    addOption("ACCT_MODEL", [B]"VAL_1", [/B]"Reports/Account/account+acct_model/4.htm");
    addOption("ACCT_MODEL", "VAL_2", "Reports/Account/account+acct_model/5.htm");
    addOption("ACCT_MODEL", "VAL_3", "Reports/Account/account+acct_model/6.htm");
    addOption("ACCT_MODEL", "VAL_4", "Reports/Account/account+acct_model/7.htm");
    addOption("ACCT_MODEL", "VAL_5", "Reports/Account/account+acct_model/8.htm");
    addOption("ACCT_MODEL", "VAL_6", "Reports/Account/account+acct_model/9.htm");

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

    Default Any answers to "Chained select menu with xml??"

    I also have a need for this: to populate HTML SELECT menus with XML data.

    Does anyone have a solution?

    Thank you.

    - Scott
    Scottsdale, AZ 06-23-2007

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
  •