Problem with getElementsByClassName
<p>Following code is causing the problem:</p>

<pre><code>var CheckBoxes = document.getElementsByClassName('DeleteCheckBox')

for (var i = 0; i &lt; CheckBoxes.length; i++) {
    CheckBoxes[i].checked = false;        
}
</code></pre>

<p>Well, the checkboxes are still selected after this runs. And it runs, because I checked the i variable and it is counting.</p>

<p>What is wrong here? By the way, only checkboxes have the "DeleteCheckBox" class, so only checkboxes get returned by getElementsByClassName.</p>

<p>SOLVED:</p>

<p>I've found the problem. I am using asp.net and the framework seems to assign the class to the "label" (it creates a span tag) of the checkbox, not to the input.</p>

<p>Fixed with InputAttributes.Add("class", "DeleteCheckBox"); (asp.net codebehind)</p>
