dependent drop down list (pre-filled from XML file)

Discussion in 'Javascript' started by patricksabourin@hotmail.com, Jul 19, 2006.

  1. Guest

    Hi,

    I have an XML file that looks similar to this:
    <XML>
    <continents>
    <continent name="North America">
    <country name="Canada">
    <city name="Winnipeg"/>
    <city name="Toronto"/>
    </country>
    <country name="USA">
    <city name="New York"/>
    <city name="Los Angeles"/>
    </country>
    </continent>
    <continent name="Europe">
    <country name="England">
    <city name="London"/>
    </country>
    </continent>
    </continents>
    </XML>


    On a webpage, I would like to do the following:

    3 dependent drop down boxes (select controls) and a "go" button:
    1 - Continents
    2 - Countries
    3 - Cities
    Button "Go"

    When a user selects a particular continent, the available countries and
    cities are displayed in the respective drop down box.
    When the user selects a particular coutry, only the cities for that
    country are listed.
    Then, the user can select a city.

    The user clicks the "Go" button and then the user is taken to that
    webpage.


    What I need to know because I don't know XML, is this possible?
    how do I store the path with the city in the XML file?
    How do I get this whole thing to work for all (at least most browsers)?

    Thanks
    , Jul 19, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SirPoonga
    Replies:
    2
    Views:
    739
    Ben Strackany
    Jan 7, 2005
  2. weiwei
    Replies:
    0
    Views:
    998
    weiwei
    Jan 5, 2007
  3. msimmons
    Replies:
    0
    Views:
    454
    msimmons
    Jul 16, 2009
  4. Replies:
    5
    Views:
    251
  5. Replies:
    3
    Views:
    273
Loading...

Share This Page