By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,934 Members | 1,441 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,934 IT Pros & Developers. It's quick & easy.

using drop down boxes to filter data from a database

P: n/a
I think I'd have to do a combination of ASP and javascript to do this.
What I want to do fill the first drop down box with values from a
database query. Then based off that selection fill in the values of
another drop down.

Let's use the car industry as an example. Lets say I am storing in a
database the data and relationships between car make, car type, and car
model. So the first drop down box would like all makes. Upon
selecting that the second dropdown will list all types (SUV, truck,
sports car) that make has. That selection will drive the third drop
down to list the models that match that make and type. All the data
for that is stored in a database. How would I accomplish this?

Jul 23 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
http://www.aspfaq.com/show.asp?id=2270

Don't forget to list IHC as a vehicle manufacturer! All those damn car
sites forget.

--

Ray at work
Microsoft ASP/ASP.NET MVP
"SirPoonga" <ke*********@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
I think I'd have to do a combination of ASP and javascript to do this.
What I want to do fill the first drop down box with values from a
database query. Then based off that selection fill in the values of
another drop down.

Let's use the car industry as an example. Lets say I am storing in a
database the data and relationships between car make, car type, and car
model. So the first drop down box would like all makes. Upon
selecting that the second dropdown will list all types (SUV, truck,
sports car) that make has. That selection will drive the third drop
down to list the models that match that make and type. All the data
for that is stored in a database. How would I accomplish this?

Jul 23 '05 #2

P: n/a
Hehe, remember, I am using this as an example. What I really need to
do is drive about 8 drop downs to filter out properties of some
products. Once everything has been selected I need to generate the
part numbers to create the product.

Jul 23 '05 #3

P: n/a
Zi
I am doing a similar thing. I have been able to Load the second drop
down on the change event of the first drop down. This is all done
client side and is working like a dream. The problem is server side.
When I do a post back, I have a watch on the second drop down list
(dynamically loaded using JavaScript). The list is empty. It does not
have any of the items I added on the client. If I do a
"Request.Form.secondDropDown" this gives me the correct selected value
of the drop down.

Are the changes ignored on the server? Surly not... If not how do I get
the server to recognise that I have made changes to the client.

Kind Regards

Ziyad Makki
Software Systems Developer
TTT Moneycorp Limited

Jul 23 '05 #4

P: n/a
On 4 Feb 2005 02:45:11 -0800, "Zi" <zi*********@ttt.co.uk> wrote:
I am doing a similar thing. I have been able to Load the second drop
down on the change event of the first drop down. This is all done
client side and is working like a dream. The problem is server side.
When I do a post back, I have a watch on the second drop down list
(dynamically loaded using JavaScript). The list is empty. It does not
have any of the items I added on the client. If I do a
"Request.Form.secondDropDown" this gives me the correct selected value
of the drop down.

Are the changes ignored on the server?
Actually, yes. The server will never know about anything on the
client unless you tell it.
Surly not... If not how do I get
the server to recognise that I have made changes to the client.


You have to send the changes back to the server. Form or query,
unless the client tells the server what it did the server will never
know. Once the server has sent the data that makes up the page,
there's no connection to the client for the server to monitor.

Jeff
Jul 23 '05 #5

P: n/a
Thanks for the reply Jeff!

When you say "You have to send the changes back to the server. Form or
query..." What do you mean exactly? Could you give me an example?

I am already picking up the changes in the I have made using the
Request.Form.secondDropDown.... Is this what you mean?

Regards
Zi
Actually, yes. The server will never know about anything on the
client unless you tell it.
Surly not... If not how do I get
the server to recognise that I have made changes to the client.


You have to send the changes back to the server. Form or query,
unless the client tells the server what it did the server will never
know. Once the server has sent the data that makes up the page,
there's no connection to the client for the server to monitor.

Jeff

Jul 23 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.