The sample below works - please note the bold OnClick event.
I cannot seem to get the the SelectedValue to change to 'NumberOne' with an onClick event? (possibly a syntax question because substituting 'NumberOne' for '1' in the line doesn't work)
Thanks in advance for your help!
<form name="TestForm" method="post" action="">
<select name="TestSelect">
<option value="select..." selected>Select...</option>
<option value="1">1</option>
<option value="NumberOne">NumberOne</option>
</select>
</form>
<a href="#" onClick="document.TestForm.TestSelect.selectedIndex = '1';">test</a>
I cannot seem to get the the SelectedValue to change to 'NumberOne' with an onClick event? (possibly a syntax question because substituting 'NumberOne' for '1' in the line doesn't work)
Thanks in advance for your help!
<form name="TestForm" method="post" action="">
<select name="TestSelect">
<option value="select..." selected>Select...</option>
<option value="1">1</option>
<option value="NumberOne">NumberOne</option>
</select>
</form>
<a href="#" onClick="document.TestForm.TestSelect.selectedIndex = '1';">test</a>