>This is just one approach I tried. > > (mm:mmCheckBox ID="chkAgree" runat="server" Checked="false" Text="I Agree to the Terms" /) > > (mm:mmButton ID="btnAgreeContinue" runat="server" Text="Continue" > Enabled="False" /) > >function SetAgreeAndContinue(checkbox, buttonid) { > var button = document.getElementById(buttonid); > > if (checkbox.checked) > button.enabled = true; > else > button.enabled = false; > } > >In the code behind >protected override void OnInit(EventArgs e) >{ > chkAgree.Attributes.Add("onClick", string.Format("javascript:SetAgreeAndContinue(this,'{0}');", btnAgreeContinue.ClientID)); > base.OnInit(e); >} >Haven't tried your code but something based on this should work (assuming the mm controls are derived from the asp ones):
<head runat="server"> <title></title> </head> <script language="javascript" type="text/javascript"> function SetAgreeAndContinue(checkbox) { var button = document.getElementById("btnAgreeContinue"); button.disabled = !checkbox.checked; } </script> <body> <form id="form1" runat="server"> <div> <asp:CheckBox ID="chkAgree" runat="server" onclick="SetAgreeAndContinue(this)" /> <asp:Button ID="btnAgreeContinue" runat="server" Text="OK" disabled="true" /> </div> </form> </body>