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
Load list.txt to bat file
Mac backup: unsupported file characters
date format validation sybase stored procedure
Page.Title
How to block video and audio streaming in ISA 2006
How to install Solaris 10 in 2 disks at the same time or 4 disks using zfs, need good documentation on zfs
SQL2005 View being forced to Encrypted
Communication between 2 remote Servers
Unable to install Webmin
Exchange Server mail delay.