navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Search and results page help

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Search and results page help
Page: [1]
 
99bird

 

Posts: 15
Joined: 3/19/2004
Status: offline

 
Search and results page help - 9/21/2007 14:50:02   
After searching this forum until my eyes have crossed. I am looking for a good sample, example or tutorial that would give me and idea on how to do a search page that would have 3 dynamic independent dropdown boxes and a "fuzzy" search box that would post the results to the same page. An example would be
(1) dropdown to search for a category
(2) dropdown to search by collection
(3) dropdown to search by designer
(4) text " fuzzy" (like) search box to be able search by entering a category name, a collection name, designers name or a model number or model number prefix.
Thanks to everyone in advance for your help and assistance.
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: Search and results page help - 9/24/2007 8:20:03   
The dropdowns are fairly straightforward and are found a lot of places. I'm surprised you didn't find one. Try searching just for 'dropdown' in the ASP forum and I'm sure you'll find a few. If not, let me know and I'll find some.

Item #4 is probably your big issue and I have answered that Q a few times. It essentially boils down to building the SQL on the fly. Building the SQL can look something like this:

<%DIM myQuerystring 

myQuerystring = "" 

IF trim(Request.Form("FirstName" )&"") > "" THEN 
myQuerystring = " (firstName = ' " & IF Request.Form("FirstName" ) & " ' )" 
END IF 

IF trim(Request.Form("LastName" )&"" > "" THEN 

' check to see if myQuerystring has anything in it 
IF myQuerystring > "" THEN 
myQuerystring = myQuerystring & " AND " 
END IF 

myQuerystring = myQuerystring & " (lastName = '" & IF Request.Form("LastName" ) & "' )" 
END IF 

IF trim(Request.Form("State" )&"") > "" THEN 

' check to see if myQuerystring has anything in it 
IF myQuerystring > "" THEN 
myQuerystring = myQuerystring & " AND " 
END IF 

myQuerystring = myQuerystring & " (state = '" & IF Request.Form("State" ) & "' )" 
END IF 

IF trim(Request.Form("Title" )&"") > "" THEN 

' check to see if myQuerystring has anything in it 
IF myQuerystring > "" THEN 
myQuerystring = myQuerystring & " AND " 
END IF 

myQuerystring = myQuerystring & " (title = '" & IF Request.Form("Title" ) & "' )" 
END IF 

mySQL = "SELECT * FROM myTable" & myCriteria
%> 



That help any?


_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to 99bird)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Search and results page help
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts