Rotating through Values in a Table Cell
<p>So what I'm trying to accomplish now is actually just a simplified version of a small project I'm working on.  What I'm trying to do first is to have a table of 10 rows with each row having one value in it.  After 5 seconds, the function makeTable will run and increment the values in each cell.  Right now, all I end up with is an endless loop where it is constantly incrementing the values if I put an alert/document.write check after the inner HTML is changed.  </p>

<p>Ultimately, I want to replace the numbers with images, but if I can at least get the numbers working, then I can build on top of that.  Any help you guys can give would be great.  Thank you!</p>

<pre><code>    &lt;html&gt;
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt;
&lt;head&gt;

&lt;script type="text/javascript"&gt;

document.write("&lt;table&gt;");  
    var i;
    for(i=0;i&lt;10;i++){

        document.write('&lt;tr&gt;&lt;td id="Cell' + i + '"&gt;'+i+'&lt;/td&gt;&lt;/tr&gt;\n');
    }
    document.write("&lt;/table&gt;");


function makeTable(n){
    for(i=n;i&lt;10+n;i++){
        var cell="Cell"+i;  
        document.getElementById(cell).InnerHTML=i+1;

    }   
setTimeout(makeTable(n+1), 5000);
}

setTimeout(makeTable(1), 5000);

&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
