Checkboxlist count function not working
<pre><code>      function isSubCateChecked() {
            var chkBoxList = document.getElementById("ctl00_ContentPlaceHolder1_chkSubCategory");
            var chkBoxCount = chkBoxList.getElementsByTagName("input");
            var isCheck = false;
            for (var i = 0; i &lt; chkBoxCount.length; i++) {
                if (chkBoxCount[i].checked)
                    isCheck = true;
            }

            if (!isCheck) {
                alert("Please Select a Sub Category From Product info Tab!");
                return false;
            }
            else
                return true;
        }

&lt;asp:Button ID="btnSave" runat="server" BorderWidth="1px" Width="70px" OnClick="btnSave_Click"
                    CssClass="SaveButton" Height="22px" CausesValidation="true"  OnClientClick="if(!isSubCateChecked()) return false;" /&gt;
</code></pre>

<blockquote>
  <p>This is my java script code plz help me in code my javascript and below code is button of calling that function</p>
</blockquote>
