Forum Moderators: open
I have a page that has a countdown timer, and an iframe. An advertisement loads in the iframe and after the timer is down you can go on.
However, some sites seem to be freezing the timer. Using the error console in Firefox, it's usually some kind of error on the website being viewed.
Is there a way to make the timer work, even if the site in the iframe flips out? When I was using normal frames this didn't happen..
Thanks!
var fronttext='<font face=verdana>';
var backtext='</font>';
function countdown(number) {
document.getElementById("count").innerHTML=fronttext + number + backtext;
if (document.formname) {
document.formname.ta.value = (10 - number);
}
var next = number - 1;
if (next >= 0) { setTimeout("countdown('" + next + "')",1000); }
else { switchdiv(); }
}