linking a page to a selection in a drop down text box

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

hi all,

is it possible to link a selection in a drop down list in
a text box to a web page?

i want to allow a visitor to select a single item from a
drop down list and then have a button, such as "Go", that
will take them to a page linked to the item selected.

tia
 
You don't want a textbox, you want a dropdown select box. This will do what you want.
Copy and paste into a page and give it a test drive.

<form>
<p align="center"><b>Select a Site </b>
<select id="setit" style="color: #0000FF" size="1" name="test">
<option value="">Select one</option>
<option value="http://www.altavista.com">AltaVista</option>
<option value="http://www.yahoo.com">Yahoo</option>
<option value="http://www.google.com">Google</option></select>
<input type="button" value="Go" onclick="window.open(setit.options[setit.selectedIndex].value)">
</p>
</form>


Add new option and value lines and edit the urls as needed.

hth

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
Back
Top