Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

IE modal dialog interfere with window.setTimeout and window.setInterval

$
0
0
My Javascript code does something (like update UI) every 3 seconds. The code is shown below using window.setInterval function. In IE (regardless which version) browser, if I open Help->About dialog, or Toos->Internet options dialog, the timer callback stops being called until I close the dialog.  I tried window.setTimeout function with the same result in IE.

I don't have this problem in Firefox when I open Help->About dialog while the script is running.

Has anyone encounter this problem in IE? What is the workaround then? Thanks.

<script type="text/javascript">
window.setInterval(function(){
   // do something, such as
   console.log("hello");
}, 3000);
</script>

Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>