Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2006

    Unanswered: Dynamically dependent listboxes

    I want to create two dynamically dependent list boxes. The first one being the main which retrieves the data from the database and second one being the child. When a value in the first list box is clicked, the second one should get populated. I am not too comfortable with Arrays, is it possible to workout the solution in some other way. If possible please point me to some useful sites. Thanks in advance.

  2. #2
    Join Date
    Mar 2003
    Atlanta, GA
    Just read the DB and populate the listbox. *may* have some examples.

    You can put the first list in a FORM, and then click a submit button to send the selected value from the first list back to the page again, to populate the 2nd list.

    You *may* want to investigate a javascript solution if your DB is small.
    Last edited by MrWizard; 04-29-06 at 22:54.

  3. #3
    Join Date
    Aug 2005
    D/FW, Texas, USA
    As mentioned, if your database is small you could use JavaScript to facilitate changing the menus without posting back to the server. A sample of the client side script is here. You'll just need your asp to generate the appropriate javascript options.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts