Hii g2000!!
Change your code execution steps :)
i.e
<select name="mySelect1" id="mySelect1">
<option value="">---</option>
<option value="1">1</option>
<option value="2">2</option>
</select>
<% If rs("mySelect1") <> "" Then %>
<script language="javascript">
alert('test');
document.getElementById('mySelect1').value =
<% =rs("mySelect1") %> ;
</script>
<% End If %>
Note-The reason is that at the time of script executing there is no element with 'mySelect1' option ,so you need to place ur script just below to Option.
Hope this will help you
Cheers :)
vinod
|