472,127 Members | 1,469 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,127 software developers and data experts.

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 1232
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 leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.