F
Fulgore
I have been using some javascript code I found online to do a generic
progress bar for a long time. Recently, IE7 has decided that it
doesn't want to wait on it any more. It now waits about 1-2 minutes
and then displays the generic "Webpage could not be displayed"
message. Has something changed?
Here is the code I have been using. It is posting to a ASP.NET page
that I have verified is still running after IE7 gives up on it.
....[snip]...
var ctr = 1;
var ctrMax = 50; // how many is up to you-how long does your end
page take?
var intervalId;
function Begin()
{
//set this page's window.location.href to the target page
window.location.href = "<%= Request.QueryString("destPage")%>";
// but make it wait while we do our progress...
intervalId = window.setInterval("ctr=UpdateIndicator(ctr, ctrMax)",
500);
}
function End() {
// once the interval is cleared, we yield to the result page (which
has been running)
window.clearInterval(intervalId);
}
function UpdateIndicator(curCtr, ctrMaxIterations)
{
curCtr += 1;
if (curCtr <= ctrMaxIterations) {
indicator.style.width =curCtr*10 +"px";
return curCtr;
}
else
{
indicator.style.width =0;
return 1;
}
}
</script>
</HEAD>
<body onload="Begin()" onunload="End()">
....[snip]...
progress bar for a long time. Recently, IE7 has decided that it
doesn't want to wait on it any more. It now waits about 1-2 minutes
and then displays the generic "Webpage could not be displayed"
message. Has something changed?
Here is the code I have been using. It is posting to a ASP.NET page
that I have verified is still running after IE7 gives up on it.
....[snip]...
var ctr = 1;
var ctrMax = 50; // how many is up to you-how long does your end
page take?
var intervalId;
function Begin()
{
//set this page's window.location.href to the target page
window.location.href = "<%= Request.QueryString("destPage")%>";
// but make it wait while we do our progress...
intervalId = window.setInterval("ctr=UpdateIndicator(ctr, ctrMax)",
500);
}
function End() {
// once the interval is cleared, we yield to the result page (which
has been running)
window.clearInterval(intervalId);
}
function UpdateIndicator(curCtr, ctrMaxIterations)
{
curCtr += 1;
if (curCtr <= ctrMaxIterations) {
indicator.style.width =curCtr*10 +"px";
return curCtr;
}
else
{
indicator.style.width =0;
return 1;
}
}
</script>
</HEAD>
<body onload="Begin()" onunload="End()">
....[snip]...