Page Loading Indicator

Posted on 2007-07-25
Last Modified: 2008-02-01
I have an ASP page that takes approximately 45 seconds to load.  When loading the data, I would to display an animated GIF that indicates the page is being loaded.  I have tried several methods but I can't seem to display the image while the ASP loads.  Any information would be greatly appreciated.  Thank you.
Question by:TheChos
    LVL 14

    Accepted Solution

    Check this site....this should help you code...
    LVL 14

    Expert Comment

    In the code below instead of the text Please Wait, you can add the image....

    <BODY onLoad="cacheOff()">
        <!-- BEGINNING OF THE SCRIPT -->
        <STYLE TYPE="text/css">
        #cache {
        position:absolute; left=10; top:10px; z-index:10; visibility:hidden;
        Lines above are creating a layer which show a message
        displaying the 'PLEASE WAIT ... ' message
        <SCRIPT LANGUAGE="JavaScript">
        ver = navigator.appVersion.substring(0,1)
        if (ver >= 4)
              document.write('<DIV ID="cache"><TABLE WIDTH=400 BGCOLOR=#000000 BORDER=0 CELLPADDING=2 CELLSPACING=0><TR><TD ALIGN=center VALIGN=middle><TABLE WIDTH=100% BGCOLOR=#FFFFFF BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD ALIGN=center VALIGN=middle><FONT FACE="Arial, Verdana" SIZE=4><B><BR>PLEASE WAIT ... <BR><BR></B></FONT></TD> </TR></TABLE></TD> </TR></TABLE></DIV>');
              var navi = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4);
              var HIDDEN = (navi) ? 'hide' : 'hidden';
              var VISIBLE = (navi) ? 'show' : 'visible';
              var cache = (navi) ? document.cache :;
              largeur = screen.width;
              cache.left = Math.round(100);
              cache.visibility = VISIBLE;
        function cacheOff()
              if (ver >= 4)
                    cache.visibility = HIDDEN;

    Author Comment

    Very nice!  Thank you.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
    Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now