I have a page that needs to be refreshed every 60 seconds. On this page I am using iBox to popup various items. My problem is that a meta refresh kills the popup which is not wanted. Please keep in mind I have zero to little experience with javascript so my solution may be fundamentally wrong.
The solution I came up with is to use javascript to do the refresh. When the page loads I will start the timer, when an ibox pops up I will clear the timer, when the ibox closes I will start the timer again.
I am setting this up by 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 stemming from when I try to call clearTimeout(resetID). I am trying to call the method from the ibox script's hide function, but it doesnt actually clear out the timer. I think it may be a scope issue and I may need to do some sort of Object.clearTimeout(Object.resetID) but that is just a guess.