Connecting Tech Pros Worldwide Forums | Help | Site Map

Listbox Click

Newbie
 
Join Date: Aug 2009
Posts: 1
#1: Sep 3 '09
Hi Everybody

Can anyone help me with a sample code that can do the following in ASP.

Two listboxes : First one populated with a list of countries then if you click that country , all customers from that country should come up in the 2nd listbox.

Hope that is a clear explanation,
So it must be linked to a database, with a customers database..

thanks
Angeloti

GazMathias's Avatar
Expert
 
Join Date: Oct 2008
Location: Bristol, United Kingdom
Posts: 145
#2: Sep 4 '09

re: Listbox Click


Hi,

We are not going to write this code for you. You can post here what you've tried already and we'll help point you in the right direction.

If you've tried nothing then this should help:

Firstly, select customers from the database and write each option into a select box.

Either via JavaScript onChange or via a form button, pass the selected value back to the same page with the queystring (?cid=optionvalue).

If the querystring cid is blank then do nothing, otherwise select all customers from the database where the customer ID is the same as the cid in the querystring, and then write those customers into select options.

Done.

Gaz.
Reply