Microsoft
Software
Hardware
Network
Question : Select Input Radio Button on page load from javascript or code behind
Have the following code:
<div class="radiobuttons">
<input id="rPublic" runat="server" type="radio" name="Public" value="Public" onclick="Target('Public');
" />Public
<input id="rPrivate" runat="server" type="radio" name="Private" value="Private" onclick="Target('Private')
;" />Private
</div>
How do I make the Public radio button selected on page load. Either using javascript or in my code behind using vb.net. Thanks.
Answer : Select Input Radio Button on page load from javascript or code behind
Code Behind
rPublic.checked=true
JS:
<script>
var rb = document.getElementById("r
Public");
rb.checked=true;
</script>
HTML:
<input id="rPublic" runat="server" type="radio" name="Public" value="Public" onclick="Target('Public');
" checked />Public
Random Solutions
Backing up, virtual machines - Best Method.
Applying group sum to higher level
How can I make an easier URL?
How can I set up email on my Samsung Black Jack cell phone (log)?
Cisco - Site to Site VPN - IPSEC
How do display number as KB, MB, or GB?
Permission Problems Creating Exchange Mailbox
Asterisk+Polycom: Program a key on polycom to transfer-to or conference-in a specific extension
Display Key Fields
Windows Service crashing on one machine, not on the other