S
Scott Natwick
I am having trouble validating that a selection has been made from a
RadioButton.
I created a script to trigger from a CustomValidator, however, it only works
when I run the app locally, from the debugger. Once I upload it to the
server and run, the script no longer triggers.
Any ideas?
Thanks in advance,
Scott
<script language="javascript">
function ValidateRadiobutton(oSrc, args) {
if(document.all["<%=rbChoiceA.ClientID%>"].checked == false &&
document.all["<%=rbChoiceB.ClientID%>"].checked == false &&
document.all["<%=rbChoiceC.ClientID%>"].checked == false){
args.IsValid = false;
}
}
</script>
<asp:CustomValidator id="vld1Chkbox"
ClientValidationFunction="ValidateRadiobutton" runat="server"
ErrorMessage="Selection must be made"
CssClass="ValidationMessage"></asp:CustomValidator>
RadioButton.
I created a script to trigger from a CustomValidator, however, it only works
when I run the app locally, from the debugger. Once I upload it to the
server and run, the script no longer triggers.
Any ideas?
Thanks in advance,
Scott
<script language="javascript">
function ValidateRadiobutton(oSrc, args) {
if(document.all["<%=rbChoiceA.ClientID%>"].checked == false &&
document.all["<%=rbChoiceB.ClientID%>"].checked == false &&
document.all["<%=rbChoiceC.ClientID%>"].checked == false){
args.IsValid = false;
}
}
</script>
<asp:CustomValidator id="vld1Chkbox"
ClientValidationFunction="ValidateRadiobutton" runat="server"
ErrorMessage="Selection must be made"
CssClass="ValidationMessage"></asp:CustomValidator>