JavaScript Progress bar is timing out.

Discussion in 'Javascript' started by Fulgore, Sep 18, 2008.

  1. Fulgore

    Fulgore Guest

    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.


    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)",
    function End() {
    // once the interval is cleared, we yield to the result page (which
    has been running)

    function UpdateIndicator(curCtr, ctrMaxIterations)
    curCtr += 1;
    if (curCtr <= ctrMaxIterations) { =curCtr*10 +"px";
    return curCtr;
    { =0;
    return 1;
    <body onload="Begin()" onunload="End()">

    Fulgore, Sep 18, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.