Chit-Chat Chit-chat is for random, off-topic discussions that don't belong in the other forums.
Please, no car topics here.

List Menu Selection on Webpages?

Thread Tools
 
Search this Thread
 
Old 27-Jun-2007, 04:04 PM
  #1  
Registered User
Thread Starter
 
imported_BlazeInEk's Avatar
 
Join Date: Apr 2004
Location: Turn on your TV!
Posts: 1,116
List Menu Selection on Webpages?

Ok, so I have a database that contains street names and street numbers. I would like it so the user first selects from the list on the webpage (which I have working) the street name. Then, the next menu list will only show the addresses that only apply to the selected street name.

For example the street name list contains:
King St
King St
King St
Then for each of those King St's street numbers:
45-50
55-70
90-110

I would like just those King St street numbers to show up once King St is selected, rather than all the address ranges in the database. I'm not really sure where to begin looking for info on how to set this up. Would it be a JavaScript? Any help is greatly appreciated. I'll be checking out Google searches as well but I know there are a lot of very smart computer guys on here. BTW, I'm using Dreamweaver, ASP, server with IIS and the database is a .mdb. Thanks so much in advance.

Mike.
imported_BlazeInEk is offline  
Old 27-Jun-2007, 06:29 PM
  #2  
Registered User
 
imported_jj2ii3344's Avatar
 
Join Date: Jul 2002
Location: Vancouver
Posts: 2,538
Can you post the structure of your tables?
imported_jj2ii3344 is offline  
Old 28-Jun-2007, 12:24 PM
  #3  
Registered User
Thread Starter
 
imported_BlazeInEk's Avatar
 
Join Date: Apr 2004
Location: Turn on your TV!
Posts: 1,116


I'm more concerned with the function associated with allowing the user to select the street name then the next menu list will only list the associated street numbers.

Edit:
I might have to change the table structure...?
imported_BlazeInEk is offline  
Old 28-Jun-2007, 12:35 PM
  #4  
Registered User
 
imported_kruption's Avatar
 
Join Date: Mar 2005
Location: Clarington
Posts: 258
Easy to do with PHP and MYSQL.

I imagine it's the same with ASP.
imported_kruption is offline  
Old 29-Jun-2007, 03:48 PM
  #5  
Senior Member
 
0xffff's Avatar
 
Join Date: Mar 2005
Posts: 160
Blaze, there are a number of ways to accomplish what you want.

From what I understand you want to have a user select an item in List Box #1 and depending on what is selected, have List Box #2 display the matching results (i.e. user selects King Street in LB1 and LB2 refreshes and displays all the relevant addresses).

Basically, you have to have a trigger so that when a non-blank item is selected in LB1, it executes a procedure to update LB2.

You can do this with Javascript (i.e. preloading all data when the page loads and assign the correct data to LB2.. bad idea. makes your pages huge), or with AJAX (make an XmlHttpRequest to dynamically load the data into LB2 from the client side.. only supported on modern browsers). Those methods will do all the work on the client (i.e. browser) side.

If you want to do it in the backend with ASP, you can make the form an IFRAME and have a javascript trigger to reload the frame when LB1 is triggered. LB2 will be created according to the parameter you pass the form page every time you load the page. This way is easier, but you will have more page loads going on. Probably not a concern for your purposes.
0xffff is offline  
Old 29-Jun-2007, 10:14 PM
  #6  
Registered User
Thread Starter
 
imported_BlazeInEk's Avatar
 
Join Date: Apr 2004
Location: Turn on your TV!
Posts: 1,116
Thanks for the idea!

After looking into it more it seems as though ASP and MySQL/SQL Server seems to be what I will be leaning towards. I just have to figure out how to program the queries and make all the connections. Should be a good project though!
imported_BlazeInEk is offline  
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Polkaroo Killa
Chit-Chat
6
13-Dec-2007 02:13 PM
LETERRIP
Chit-Chat
6
24-Sep-2006 02:12 PM
The Prophet
Chit-Chat
52
20-Apr-2004 03:33 PM
imported_BigMike
Honda Civic Performance - JDM Discussion
31
11-Apr-2002 08:26 AM



Quick Reply: List Menu Selection on Webpages?



All times are GMT -4. The time now is 04:43 AM.