[thelist] Javascript: onChange to affect the Submit button?

Jono ox4dboy at comcast.net
Tue Mar 15 10:13:26 CST 2005


Hi all,

I need a "simple" javascript (onChange maybe??) that will allow a 
submit button to go to 1 of 2 pages depending on what is selected in a 
pulldown menu, as shown below.

The pulldown menu:

<td align="left" valign="top">
	<select name="searchpedigree">
		<option value="search1" selected>Pedigrees</option> <!-- Need this to 
go to pageA.html -->
		<option value="search2">Shipments</option> <!-- Need this to go to 
pageB.html -->
	</select>
</td>


The Submit Button:
<td>
	<input name="submit" type="image" value="submit" 
src="images/btn_submit.gif" alt="Submit" class="auto"> <!-- GO TO 
pageA.html -OR- pageB.html -->
</td>

I am certain this is a very simple script, I am just not that 
experienced with JS.  I do a bit here and there, but that's about it.  
Can someone please help me out, or point me to an online 
example/tutorial?

Thanks a bunch.



More information about the thelist mailing list