Solved

multi-tier dynamic drop down list

Posted on 2009-04-13
5
673 Views
Last Modified: 2013-11-19
Hi- Total noob here.
I need to have a drop down list that populates a second drop down list which then populates a third drop down list.  For example: the first might have 3 options [A,B,C].  The next would have options loaded according to the selection of the first. For example [A1,A2,A3] or [B1,B2,B3,B4,B5] or [C1,C2].  When the 2nd list's selection is made, the third list is populated accordingly.  So the third list might have lists like this waiting to be loaded - [A1a,A1b,A1c] or A2a,A2b] or [B1a,B1b,B1c] and so on.  I hope this makes sense to someone.

I have NO idea how to make this work with javascript, asp, ajax or anything.  It will be on an aspx webpage but the data that fills the lists cannot be from a server - unless you can explain how I can do that in development.  (Sorry for being so helpless).

I've seen examples of one dropdown populating a second but they don't go to the third tier.  These examples had the options hard-coded into the javascript... and that was OK with me.

I would be grateful for any leads to tutorials or examples of the 3 tier thingy I've described.

TIA your expert input.

J2
0
Comment
Question by:dzash2000
  • 3
  • 2
5 Comments
 
LVL 15

Expert Comment

by:spprivate
Comment Utility
Not sure if i understood correctly.
You select dd1 say countries
You populate another dd say states
You select one state,then third dd say cities populate the third one.correct.
0
 

Author Comment

by:dzash2000
Comment Utility
spprivate - thanks for the reply.  Yes.  Your description is accurate.
0
 
LVL 15

Accepted Solution

by:
spprivate earned 125 total points
Comment Utility
That should be pretty easy.\
Here is an example
http://www.koderguru.com/tutorials/javascript/dynamiclist.php
Now have the same code as in first dropdown ,for second dropdown as well.
I dont see any issue
0
 

Author Closing Comment

by:dzash2000
Comment Utility
spprivate - thanks for the link. It was simple enough for me to see what was going on but I had to figure out how to go to the 3rd tier (your example only showed 2 ).  However because the example was simple and clear I actually WAS able to work it out myself - so you made me work at it and now I feel smarter!!  Thanks.
0
 

Author Comment

by:dzash2000
Comment Utility
Thanks - while the example doesn't go to the third tier as I had needed it does provide enough info in a simple enough example so that I could actually work out the 3rd tier on my own.  I now feel like I'm smarter than before!
D2
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now