List Menu Selection on Webpages?
#1
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.
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.
#3
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...?
#5
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.
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.
#6
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!
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!
Thread
Thread Starter
Forum
Replies
Last Post