title: How to loop through javascript array and display only part of array then repeat
body: <p>I'm having trouble getting my head around this.  I have a single array of lets say 150 items.  I only want to display 50 at a time.  So, I'll have a button at the end of the display that says something like: "Display 51-100".  OnSubmit of this button, javascript code displays 51-100.  Ditto, next 50.  Suggestions most appreciated!</p>
  
  <pre><code>         for(var i = 0; i &lt; myArray.length; i++ ){
       document.getElementById("comment" + i).innerHTML = commentBody; 
  </code></pre>
  
  <p>}</p>
  
  <p>HTML where item needs to be written:</p>
  
  <pre><code>    &lt;div style="clear:both"&gt; &lt;br&gt; &lt;/div&gt;
      &lt;div  id="flapBox13" class="flapBox"&gt;
        &lt;p id='whenFlap13' class="mscFlapTime"&gt;&lt;/p&gt; 
        &lt;b  id='flapSum13' class="mscFlapSumBold"&gt;&lt;/b&gt;    
        &lt;p     id='flap13' class="mscFlapText"&gt;&lt;/p&gt;            
      &lt;/div&gt; 
  </code></pre>