<script type="text/javascript">
function EnableControl(val) {
var sbmt = document.getElementById("<%=btnSubmit.ClientID %>");
if (val.checked == true) {
sbmt.disabled = false;
}
else {
sbmt.disabled = true;
}
}
</script>
<div style="float: left;">
<asp:CheckBox ID="chkAgree" runat="server" Text="I Agree" onclick="EnableControl(this)"
Checked="false" />
<asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" /></div>
function EnableControl(val) {
var sbmt = document.getElementById("<%=btnSubmit.ClientID %>");
if (val.checked == true) {
sbmt.disabled = false;
}
else {
sbmt.disabled = true;
}
}
</script>
<div style="float: left;">
<asp:CheckBox ID="chkAgree" runat="server" Text="I Agree" onclick="EnableControl(this)"
Checked="false" />
<asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click" /></div>
No comments:
Post a Comment