Java script validations for Radio button list (atleast one must be selectable)
var RBPurpose = document.getElementById("<%=rtbPurposes.ClientID%>");
var radio1 = RBPurpose.getElementsByTagName("input");
for (var i = 0; i < radio1.length;
i++) {
if (radio1[i].checked) {
break;
}
else {
ErrorMsg = "Fields marked with (*)
cannot be left blank";
}
}
Comments
Post a Comment