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
Jython to modify JDBC Connection Pool Parameters
Is there a way to wrap text in a floated div displayed inline
HP z200 Workstation Windows 2008 R2 'PCI serial port' driver and 'PCI Simple Communications controller' driver needed
How to retrieve a Joomla database password - GoDaddy installation
div id
Add Spanish dictionary in to Office 2007 english
Domain Controller rename
SBS 2008 Small Business Server Internet Activity
IIs7 on Windows server 2003
How to add scriptaculous to Wordpress Site?