I have a page that needs to be updated every 60 seconds. On this page, I use iBox to display various elements. My problem is that a meta update kills a popup that is not required. Please keep in mind that I have zero experience with javascript, so my solution may be fundamentally wrong.
The solution I came across is to use javascript to update. When the page loads, I started the timer, when ibox appears, I will clear the timer, when ibox closes, I started the timer again.
I configure this using a simple function.
function timedRefresh (timeoutPeriod) {
var resetId = 0;
resetId = setTimeout ("location.reload (true);", timeoutPeriod);
}
Then I call the function <body onload="timedRefresh(60000)">.
My problem is when I try to call clearTimeout(resetID). I am trying to call a method from the ibox script hide function, but it does not actually clear the timer. I think this may be a problem with the area, and I might need to do something like Object.clearTimeout(Object.resetID), but this is just an assumption.
source
share