SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Pull Down Menus

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Oct 2007
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Pull Down Menus

    Hello All,

    I would like to create three Pull Down Menus..... This is how they would look. continents would make first Pull Down menu, the second would be countries, So if one picks from the first say Africa, the second would have only the countries in Africa. And when one clicks the second one, that is picking a country ... say Sudan, then the third Pull Down will have states/provinces in Sudan.

    How do I do this? I want something that is simple and basic?

    Regards,
    Janus

  2. #2
    SitePoint Addict sdleihssirhc's Avatar
    Join Date
    Feb 2009
    Posts
    387
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    How are you going to get the contents of the new dropdowns? For example, when I select "North America" from the first one, where is the list of countries for the second one coming from?
    I'm the web overlord for Graphic Business Systems

  3. #3
    SitePoint Member
    Join Date
    Oct 2007
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I will store it in JavaScript data type ... {"North America":[The USA, Canada] , "Africa":["Kenya", "Tunsia", "Morroco"]}

  4. #4
    SitePoint Addict sdleihssirhc's Avatar
    Join Date
    Feb 2009
    Posts
    387
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I'm sorry, I could have asked this before, but what browsers are you targeting? Do you want this to work on mobile as well as desktop?

    Also, you're going to be watching the "change" event for these <select> elements. The function's logic is going to work like this: "When the user chooses a new continent/country, change the other options." Are you ever going to want to remove that function?
    Last edited by sdleihssirhc; Oct 4, 2011 at 12:23. Reason: Added another question I have.
    I'm the web overlord for Graphic Business Systems


Tags for this Thread

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
  •