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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drop down list

Status
Not open for further replies.

zickler

Technical User
Mar 6, 2004
28
IE
At the moment I have individual search input boxes that search for movies by Actor , by Title and by Director. The actor search calls up the script ActorSearch.asp, Title calls TitleSearch.asp and Director calls DirectorSearch.asp. What I want is to have one input box and a drop down list with the options of Actor, Title, Director like the code below. My question is by doing this drop down list method how do I call up the ActorSearch.asp, TitleSearch.asp and DirectorSearch.asp depending on what the user chooses.
Is it some sort of Case Select and response.write redirect ?

<p align="left"><font size="1" face="Arial, Helvetica, sans-serif">Search For
Movies</font></p>
<p><font size="1" face="Arial, Helvetica, sans-serif">
<input name="textfield" type="text" size="20">
</font></p>
<p>
<select name="select" size="1">
<option value="By Title" selected>By Title</option>
<option value="By Actor">By Actor </option>
<option value="By Director">By Director</option>
</select>
</p>

Thanks in advance
 
You can do this way
Code:
<font action="search.asp" method=post>
<p align="left"><font size="1" face="Arial, Helvetica, sans-serif">Search For 
  Movies</font></p>
<p><font size="1" face="Arial, Helvetica, sans-serif">
  <input name="textfield" type="text" size="20">
  </font></p>
<p> 
  <select name="select" size="1">
    <option value="By Title" selected>By Title</option>
    <option value="By Actor">By Actor </option>
    <option value="By Director">By Director</option>
  </select>
</p>
</form>

search.asp

select Request("select")
 case "By Title"
  Server.Transfer "byTitle.asp"
 case "By Actor"
  Server.Transfer "byActor.asp"
 case "By Director"
  Server.Transfer "byDirector.asp"
end select

________
George, M
Searches(faq333-4906),Carts(faq333-4911)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top