I have a web page. On this page I have a DIV that is getting a feed from another PHP page. This feed also have a countdown. I want when the count reaches 0 only the page in the DIV to redirect to my destination of choice. Here is what I am using below:
function CountDown(t){
var s,c,countdown;
s= 6;
c=$('#count');
countdown = setInterval(function(){
c.html("Redirecting in " + s);
if (s == 0) {
window.location.href="Forums";
return false;
}
s--;
}, 1000);
}
Now Here is what the HTMl looks like;
<html>
//header stuff
<body>
//html stuff
<div id="Mypage"></div>
//some more html stuff
</body>
</html>
The Page in question is in the DIV with id = Mypage. What I would like is for when the countdown reaches zero the page redirects but in this case it is redirecting the entire main page. Is it possible for it to only redirect the page in the DIV to a new location? I am sure that my code window.location.href is the reason this is happening but I am not sure how to make only the page in the DIV redirect.