for loop ends unexpected in javascript
<p>I have a html button that calls this function. But for unknown reason it only goes 3 iterations.</p>

<p>Can anyone help or refer me to some good example why the for loop breaks after the third iteration?</p>

<pre><code>for(i = 1; i &lt; 10; i++) {
   alert(i);
  if (document.getElementById(i).checked) {
    alert("dda3");
    act = act + document.getElementById("TD" + i).innerHTML + delimiter;
  }
}
</code></pre>
