469,331 Members | 4,277 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,331 developers. It's quick & easy.

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

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
3 1140
Frinavale
9,735 Expert Mod 8TB
How are you storing your lists and what have you tried so far to solve the problem?

-Frinny
Oct 1 '08 #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
16,027 Expert Mod 8TB
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.

Similar topics

5 posts views Thread by Dave H | last post: by
11 posts views Thread by Bob | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by haryvincent176 | last post: by
reply views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.