Adding text periodically
<p>I am trying to run small snippet code in JavaScript, where I want to write on the web page simple hello world each 5 seconds. I think it must be ok, but no, still I got only first hello world and no more. Could you give me a hand in this? Thanks</p>

<pre><code> &lt;script type="text/javascript"&gt;
 var i=0;

 function startTimer() {

    window.setTimeout('refresh()',5000);
 }

 function refresh() {

 document.write("Hello world "+i+"&lt;br/&gt;");
 i++;
 window.setTimeout('startTimer()',1);
 } 

 startTimer();
 &lt;/script&gt;
</code></pre>
