Apologies for so basic a question, but I can't find an answer anywhere. When the button is clicked, I need to change the value a select passes to the next page. I'm not trying to change the option list on this page, but rather trying to change the value which the select passes to the next page.
<form name="myform" action="test2.php" method="get">
<select name="selectname" id="selectid">
<option value="1">1</option>
<option value="2">2</option>
</select>
<input type="submit" onclick="document.getElementById('selectid').value='3';" />
</form>
I could easily change the passed value if it were an input rather than a select, but for some reason I am unable to get this to work with a select. Either a straight javascript or a prototype answer will work.