settimeout in IE
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/5651668/set-time-out-in-javascript">set time out in JavaScript</a>  </p>
</blockquote>



<pre><code>if (document.getElementById("safeForm4d").submitted.value == "false") {
    document.getElementById("safeForm4d").submitted.value = "true";
    setTimeout(function() {
        'document.getElementById("safeForm4d").submit()'
    }, 3000);
} else {
    document.getElementById("toHide").style.display="none";
}
</code></pre>

<p>It is working fine in FF and other except IE. In IE it wait for 3 seconds then animation stops and goes for page processing ie trying to access next page after 3 seconds.</p>

<p>Suppose If i make timeout is 100000 seconds( ie 1 min), animation or dynamic page loading is happening for 1 min. After 1 min next page processing request and goes to new page.</p>

<p>My requirement is dynamic action or animation should happen till the next page displays and waiting period should be dynamic ie it should clear time if next page is already processed.</p>
