ASP.net - CheckListBox & JQuery Validation

     <asp:CheckBoxList ID="FamilyMemberCheckBoxList" runat="server" required = "required" ForeColor="Blue" Visible="false">
     </asp:CheckBoxList>


<script type="text/javascript">
    function ValidateCheckBoxList(sender, args) {
        var checkBoxList = document.getElementById("<%=FamilyMemberCheckBoxList.ClientID %>");
        var checkboxes = checkBoxList.getElementsByTagName("input");
        var isValid = false;
        for (var i = 0; i < checkboxes.length; i++) {
            if (checkboxes[i].checked) {
                isValid = true;
                break;
            }
        }
        args.IsValid = isValid;
    }
</script>

Comments

Popular posts from this blog

PUTTY - The server's host key is not cached in the registry cache

OIM-12c Installation - FMW - SOA - IDM

SAML & OAuth 2.0