checkbox list -javascript
<p>In my aspx page i am having a checkbox list ..It has binded values from a table..
I need to validate the checkbox list ..I tried the following script </p>

<pre><code> var checkBoxCount = 0;     

        var elements = document.getElementById('&lt;%=ChkBoxList.ClientID%&gt;');

        for(i=0; i&lt;elements.length;i++)

        {

        if(elements[i].checked) 

        checkBoxCount++;

        }  

        if (checkBoxCount == 0)
               {
                alert("Please choose atleast one");
              return false;
              }
</code></pre>

<p>But I can't get the required output, it requires to select all the values in the checkbox list ..My need is atleast only one item must be selected from the checkbox list.. Using javascript</p>

<p>Thanks in advance...</p>
