J
Jason
I'm new to WebForms and struggling with very basic stuff at the moment. I am
trying to figure out how to detect a radiobutten click state using
JavaScript.
The following OnCheckedChanged code fails at runtime:
<HTML>
<HEAD>
<title>WebForm1</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<P>
<asp:RadioButton id="RadioButton1" runat="server" Checked="True"
Text="Purchase" GroupName="rb3"></asp:RadioButton><BR>
<asp:RadioButton id="RadioButton2" runat="server" Text="Refi"
GroupName="rb3" OnCheckedChanged="changed(this);"></asp:RadioButton></P>
<P>
</form>
<SCRIPT>
function changed(rb){
document.write("Click event");
}
</SCRIPT>
</P>
</body>
</HTML>
trying to figure out how to detect a radiobutten click state using
JavaScript.
The following OnCheckedChanged code fails at runtime:
<HTML>
<HEAD>
<title>WebForm1</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<P>
<asp:RadioButton id="RadioButton1" runat="server" Checked="True"
Text="Purchase" GroupName="rb3"></asp:RadioButton><BR>
<asp:RadioButton id="RadioButton2" runat="server" Text="Refi"
GroupName="rb3" OnCheckedChanged="changed(this);"></asp:RadioButton></P>
<P>
</form>
<SCRIPT>
function changed(rb){
document.write("Click event");
}
</SCRIPT>
</P>
</body>
</HTML>