How to select first value in a radio button group using Javascript.
say I have a radio button group for Country.
Canada
Englad
SouthAfrica
India
Pakistan
Japan
China
I want every time the Englad should select.
<script>
var radbut=document.getFormWarpRequest()._oLstChoicesLocation;
radbut.options[1].checked=true;
</script>
<script>
var radbut=document.getFormWarpRequest()._oLstChoicesLocation;
radbut.options[0].checked=true;
</script>
I think that's what you're looking for?
Melee,
I am looking to select the second option not the first option.
That's why I mentioned
radbut.options[1].checked=true;
By the way, both options[0] or options[1] is not working at all.
Thanks.
Sorry! I misunderstood. Have you tried doing this with Default Selections in the prompt? I'd try there first.
Try this:
http://nicbertino.com/?p=63