...

View Full Version : Dropdown Options



CurtWRC
07-26-2005, 10:05 PM
How can I make it so that when an option is chosen from a dropdown, then a button is clicked it takes you to a page. If you don't understand what I mean, this is the page Im having problems with:

http://www.rallystuff.net/Past%20Vote%20Results.htm

And I want to link to these:

2004 - http://www.rallystuff.net/Past%20Vote%20Results-2004.htm
2005 - http://www.rallystuff.net/Past%20Vote%20Results-2005.htm

This is the code Im using:

<select name="year" id="year">
<option selected>Select a year...</option>
<option>2005</option>
<option>2004</option>
</select>
</p>
<form action="" method="post" name="go" id="go">
<div align="center">
<input type="submit" name="Submit" value="Go">


Any help would be much appreciated.

Thanks,
Curt

mark87
07-26-2005, 10:08 PM
<form name="frm">
<select name="year" id="year">
<option selected>Select a year...</option>
<option value="http://www.rallystuff.net/Past%20Vote%20Results-2005.htm">2005</option>
<option value="http://www.rallystuff.net/Past%20Vote%20Results-2004.htm">2004</option>
</select>
</p>
<form action="" method="post" name="go" id="go">
<div align="center">
<input type="button" value="Go" onClick="window.location=document.frm.year.options[document.frm.year.selectedIndex].value>
</form>

CurtWRC
07-26-2005, 10:17 PM
Where do I put that?

mark87
07-26-2005, 10:34 PM
That's your new form... :cool:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum