There are many ways to access a form element and also many ways to determine the value of a variable and then branch your code depending upon what that value is. I'm assuming that you know which one's that you would like to use. Here is one way of changing the selected option of a drop down:
Code:
<select id="sel">
<option>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
<script type="text/javascript">
document.getElementById('sel').options[3].selected=true
</script>
Bookmarks