If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Dynamically dependent listboxes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-28-06, 09:46
madhuri.t madhuri.t is offline
Registered User
 
Join Date: Apr 2006
Posts: 10
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.
Reply With Quote
  #2 (permalink)  
Old 04-29-06, 21:42
MrWizard MrWizard is offline
Registered User
 
Join Date: Mar 2003
Location: Atlanta, GA
Posts: 191
Just read the DB and populate the listbox. Asp101.com *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.
__________________
Tim

Last edited by MrWizard; 04-29-06 at 21:54.
Reply With Quote
  #3 (permalink)  
Old 05-02-06, 17:17
wayneph wayneph is offline
Registered User
 
Join Date: Aug 2005
Location: D/FW, Texas, USA
Posts: 78
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On