Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search with drop down box

Status
Not open for further replies.

lookup13

IS-IT--Management
Oct 17, 2002
38
US
I am working on a web page in search box , I came along a website that has a search feature lookup parts or has a dropdown box with MFG names in it.You select Apples and it brings up all apple products.I like that feature.
I have search working , but cant get the drop down box
to work. See example of working site

 
Ok maybe its a combo box,take brand names in column A
and you can search with drop down box to each item
Drop down you select Apple
the the grid shows all Apple products

Sound Possible ?
 
Hi all,
I am working on a parts page - To show MFG
using SQL I can list all the Mfg
Two option:
1) I would to creat a dropdown box with all MFG in it
and the click search to go to all parts made by the MFG
2) I have all the Mfg list already pulled up , how can I
hyperlink or link it back to the database back to show all the parts
 
Unless you are asking how to write the SQL query (and I don't think you are), this is really a web development question, dependent on what platform you are using (ASP, ASP.NET, PHP, etc.)
 
Joe - yes and no. Web development yes and SQl
1)In one view I pull a data list of MFG out Parts Table
That work fine, now the tricky part,I want make all
Mfg hyperlink to all product listed to them in gridview.
So I am pulling from database then giving a option to
select a brand and pull up all related material.
Apple>Ipod etc
Cord etc
cable etc

How do you link a result to a database to get new results

 
When the user picks something from the dropdown, you will need to call another query using the value picked from the dropdown as a parameter.

Something like:

SELECT * FROM Parts WHERE MFG = <what was picked in the dropdown>

And again, how you do that is dependent on your web development platform. Whatever it is, I'm sure there's a tutorial out there that will show you how, or you can take a look in your web programming reference books. It's a very common scenario, so I'm sure you'll be able to find an example.
 
Hey Joe , I just could not find any examples or
tutorial.So I set it up like a Search page using
a droplist box with a button (ASP.Net)

SELECT * FROM Parts
WHERE MFG is not null

Link the Search button to the results page
On the results page I setup a gridview

SELECT * FROM [Parts]
WHERE ([Mfg] Like '%' + @Mfg + '%')

With post request from the text box values
list results..
It works great , but like to do hyperlinks
on MFgs ..
I just do know the keywords for looking this up
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top