473,890 Members | 1,690 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using drop down boxes to filter data from a database

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
5 6532
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*********@gm ail.com> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.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
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
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.s econdDropDown" 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
On 4 Feb 2005 02:45:11 -0800, "Zi" <zi*********@tt t.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
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.se condDropDown... . 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2095
by: MasterChief | last post by:
I have 3 drop down boxes on the same page. Each one is being populated by a database. One is called Location, One is called Device and the other one is called Job Title. When the user selects something from one of the drop down boxes I would like it so it automatically calls the phonelist.asp and passes the variable. What is the best way to do it so I have 3 seperate drop-down boxes that just send their variables. Should I do one form that...
3
24043
by: Random Person | last post by:
Does anyone know how to use VBA to relink tables between two MS Access databases? We have two databases, one with VBA code and the other with data tables. The tables are referenced by linked tables in the database where the code resides. If we move the database with the data tables to a new directory, the links are no longer valid. I tried to update the links by changing the Connect property and refreshing: Set td = db.TableDefs(0)...
6
2028
by: Rated R1 | last post by:
PLEASE HELP!! I am trying to create a database for my small business. I have typed a bunch of information in a table in 5 columns (style, mm, karat, quantity, labor cost). We have different labor costs obviously depending on what combination those first 4 factors are for example respectively in the columns mentioned above (abc, 5mm, 14karat, 10pieces), would be $5 for the labor cost. What I want to be able to do is produce a query...
5
2152
by: Rated R1 | last post by:
I wrote this before in the NGs, so I am going to paste the responses that I got and see if someone can please help me. Email me and we can set something up as Id even be willing to pay for your time to get me to learn this procedure: MY ORIGINAL POST: I am trying to create a database for my small business. I have typed a bunch of information in a table in 5 columns (style, mm, karat, quantity, labor cost). We have different labor...
5
4235
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
string connectionString1 = "server=(local); user=sa;password=sa; database=sonic"; System.Data.SqlClient.SqlConnection dbConnection1 = new System.Data.SqlClient.SqlConnection(connectionString1); System.Data.SqlClient.SqlCommand dbCommand1 = new System.Data.SqlClient.SqlCommand();
7
2447
by: callawayglfr | last post by:
I am building a database in access where I have a drop down box that relates to a text box, that part I have working but when someone selects information from the first drop down I need it to limit the second drop down to just the related information. Explaining this is obviously challeging. So I'll try to draw a picture: (drop down 1) Select number --- once selected description is populated in text box (drop down 2) based on first...
4
1759
by: gihope | last post by:
Hi, I have an ASP.NET 2.0 C# issue that has been troubling me for some time, and if someone could shed some light on this I would appreciate it. This seems to be a commonly themed question, although most relate to DataGrids and this is a slightly different scenario. This is completely hypothetical, but say I have a form for editing database information. This form contains two drop down boxes, one of which determines the content of the...
2
3211
by: leeperman | last post by:
In Dreaweaver I cannot filter my database results to display only specific data that is retrieved from mulptile drop down list on my search page. The drop down list selections are posted to my display page by GET. How do i write my sql code so to only display info where TOWN = "Town selected from list" AND BEDS ="No of Beds selected from list My search page form is below <form action="tsearchresults.asp" method="get" name="townSearchForm"...
26
4617
by: agarwalsrushti | last post by:
Hello, I ve created a php form for user registration in which have also used the drop down boxes. I want that data in the drop down box should be taken from mysql database. The data in qualification drop down should be taken from database and depending on what the user selected in qualification it should take the corresponding data for specialization drop down again from database itself. How can this be done. Im stuck up with it. Plz help...
0
9977
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
9816
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10802
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10452
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7161
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5837
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6036
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4260
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3268
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.