By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,795 Members | 1,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,795 IT Pros & Developers. It's quick & easy.

how to filter the listbox2 based on the selection from the listbox1

P: 2
Hi Team,
Here goes the scenario...

i have a listbox1 which contains continent details. if i select any one of the continent, then the next list box which contains the country list should display the countries corresponding to the continent.

similarly when i select the corresponding country, i should get the list of cities which are there in the continent+country list in the 3rd llistbox.

Can you please give me an example for the same.

thanks,
Prasad
Oct 1 '08 #1
Share this Question
Share on Google+
3 Replies


Frinavale
Expert Mod 5K+
P: 9,731
How are you storing your lists and what have you tried so far to solve the problem?

-Frinny
Oct 1 '08 #2

P: 2
Dear Friend,
Thanks for the reply. i need a plain java script. there can be a scenario that if the listbox 3 has been selected first then the listbox1 should also get populated automatically.

Thanks,
Prasad
Oct 2 '08 #3

acoder
Expert Mod 15k+
P: 16,027
I don't think that would be possible because if nothing has been selected in the 1st list box, you won't have anything in the 2nd and 3rd list boxes.

There are a number of ways you can do this. If you're using only JavaScript, put all your data into arrays and use the onchange event to trigger the changes for the other list box elements.

What code have you managed so far?
Oct 2 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.