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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rprasad79
    New Member
    • Mar 2007
    • 2

    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+count ry list in the 3rd llistbox.

    Can you please give me an example for the same.

    thanks,
    Prasad
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    How are you storing your lists and what have you tried so far to solve the problem?

    -Frinny

    Comment

    • rprasad79
      New Member
      • Mar 2007
      • 2

      #3
      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

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        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?

        Comment

        Working...