My problem right now is the page is loading like a loop. it is popping pages non-stop , how can I load only once after i trigger the time <= 0 ? thank you.
here is what my code looks like.
<script type="text/javascript">
var timeleft = 10;
var downloadTimer = setInterval(function(){
document.getElementById("progressBar").value = 10 - timeleft;
timeleft -= 1;
if(timeleft <= 0)
clearInterval(downloadTimer);
window.open("http://localhost/ppa/movies.php", "", "width=1500px,height=1000px",true);
}, 1000);
</script>
I guess you forgot some {}'s and meant to write:
{
...
if (timeleft <= 0) {
clearInterval(downloadTimer);
window.open("http://localhost/ppa/movies.php", "",
"width=1500px,height=1000px",true);
}
}, 1000);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With