A Loader - something like Plesk

Hi there,

I don't know if any of you came across with plesk. When you browse through the pages, a popup window pops up and says "please wait, page is loading...". And this window is modal window. when the second page loads, this pop up closes.

any idea how I can do that?

The reason why I'm trying this because the site I'm trying to develope has images of course. but sometime, I don't know why, some of the images don't load. if I go on the image and right click/ show image, it shows normally. or if I refresh the page, the pictures which didn't load correctly loads correct, but this time, some of the other images don't load :( it's a little bit annoying :)
bilgehanyildirimAsked:
Who is Participating?
 
ldbkuttyCommented:
well, even I dont know anything about ASP :=D , but that doesn't matter. :=)

Here's the tested script:

<HTML>
<HEAD>
      <TITLE>Splash Screen Sample</TITLE>
</HEAD>
<SCRIPT LANGUAGE="JavaScript">
// This script is intended for use with a minimum of Netscape 4 or IE 4.
if(document.getElementById) {
      var upLevel = true;
}
else if(document.layers) {
      var ns4 = true;
}
else if(document.all) {
      var ie4 = true;
}

function showObject(obj) {
      if (ns4) obj.visibility = "show";
      else if (ie4 || upLevel) obj.style.visibility = "visible";
}
function hideObject(obj) {
      if (ns4) {
            obj.visibility = "hide";
      }
      if (ie4 || upLevel) {
            obj.style.visibility = "hidden";
      }
}
</SCRIPT>
<BODY BGCOLOR="#FFFFFF">

            <DIV ID="splashScreen" STYLE="position:absolute;z-index:5;top:30%;left:35%;">
                  <TABLE BGCOLOR="#000000" BORDER=1 BORDERCOLOR="#000000" CELLPADDING=0 CELLSPACING=0 HEIGHT=75 WIDTH=200>
                        <TR>
                              <TD WIDTH="100%" HEIGHT="100%" BGCOLOR="#CCCCCC" ALIGN="CENTER" VALIGN="MIDDLE">
                                    <BR> &nbsp;
                                    <FONT FACE="Verdana,Arial" SIZE=1 COLOR="#000066"><B>Page Loading. Please wait...</B></FONT>
                                    &nbsp; &nbsp; <BR>
                                    <IMG SRC="wait.gif" BORDER=1 WIDTH=75 HEIGHT=15><BR><BR>
                              </TD>
                        </TR>
                  </TABLE>
            </DIV>
            
<?php
 
      flush();

      for($i = 0; $i < 10000; $i++)
      {
            echo '<img src="http://www.experts-exchange.com/images/logoTopLeft.gif"/><br/>';
      }
 
      flush();

?>

<SCRIPT LANGUAGE="JavaScript">
if(upLevel) {
      var splash = document.getElementById("splashScreen");
}
else if(ns4) {
      var splash = document.splashScreen;
}
else if(ie4) {
      var splash = document.all.splashScreen;
}
hideObject(splash);
</SCRIPT>
</BODY>
</HTML>

** For this example, put the wait.gif file in the same folder of this PHP. If your PC is too faster, increase the loop size and test it.

0
 
ldbkuttyCommented:
http://authors.aspalliance.com/peterbrunone/pleasewait.asp

You could use PHP's flush method instead of the mentioned ASP. ;=)
0
 
bilgehanyildirimAuthor Commented:
sorry but I do not know anything about ASP. So could you tell me how this can work with PHP
0
 
ldbkuttyCommented:
:=)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.