Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 16th, 2004, 09:20 AM
Registered User
 
Join Date: Dec 2003
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dynamic Linked List Boxes

Hi,
I am trying to create a dynamic linked list box. I have a asp page which has a form with various text boxes etc. In the form I have a list box which contains details of room numbers, on selection of a room another list box should appear with all the computers located in the room chosen by the user. Is there anyone who can help me with this or point me in the right direction? Any help would be greatly appreciated.

Thanks in advance

Reply With Quote
  #2 (permalink)  
Old January 16th, 2004, 10:35 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,413
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Please see this thread for details on how to "postback" with list/select boxes.

One addition to the above is that you'll need to make sure you preserve all the values in the form inputs. Post again if you're not sure how to do this.

If you need further help with the database aspect of this, please post again.

Peter
------------------------------------------------------
Work smarter, not harder.
Reply With Quote
  #3 (permalink)  
Old January 16th, 2004, 12:04 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Minneapolis, MN, USA.
Posts: 171
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you don't mind reloading the page after the first box has been selected from then this is simple.

In a nutshell:
You can do this by having two forms on the same page (page1), each one having a dropdown menu. The first form would post back to the same page it's on (page1). You then request the value of Dropdown1 upon entering the page ( e.g. Dropdown1 = request("Dropdown1") ). Now you have the criteria that you need for the second dropdown. Your second form would then post to whatever results page you have (page2).

If you do not want to reload the page in mid-stream, you can do this with an array, but it's a little more complicated and would require JavaScript, which, of course, has nothing to do with this thread. I'm sure you could find it somewhere on this site.

Dave

Reply With Quote
Reply


Thread Tools
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tell about dynamic list boxes shyamprasad Classic ASP Components 3 February 8th, 2005 02:38 PM
ASP Linked list boxes ms7ao Classic ASP Databases 1 January 19th, 2004 11:00 AM
Dynamic List Boxes swhite Access VBA 10 September 11th, 2003 02:27 PM
SQL , List Boxes/Menu Boxes, DB's Ginzu3 Classic ASP Databases 1 June 30th, 2003 05:07 AM



All times are GMT -4. The time now is 09:55 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.