Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 16th, 2004, 09:20 AM
Registered User
 
Join Date: Dec 2003
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

 
Old January 16th, 2004, 10:35 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
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.
 
Old January 16th, 2004, 12:04 PM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 171
Thanks: 0
Thanked 1 Time in 1 Post
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






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 01:27 PM
SQL , List Boxes/Menu Boxes, DB's Ginzu3 Classic ASP Databases 1 June 30th, 2003 04:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.