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
Is There Asp Code to read folder contents and create hypelinks?
mac mail client exchange email problems
Adding URL Parameter
Network connections and startup speed on new computer
ESXi 4: Understanding resxtop Output on Disk Performance
Copying excel WB in Excel 2007
What is the DOS path for Windows 7 My Documents?
Load a BLANK/EMPTY tree and list view in form
Comparison Netgear ReadyNAS vs. Buffalo Terastation
How can I create a list from a starting number and ending number in Excel?