?
Solved

A Loader - something like Plesk

Posted on 2005-04-07
4
Medium Priority
?
279 Views
Last Modified: 2010-05-18
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 :)
0
Comment
Question by:bilgehanyildirim
  • 3
4 Comments
 
LVL 32

Expert Comment

by:ldbkutty
ID: 13727226
http://authors.aspalliance.com/peterbrunone/pleasewait.asp

You could use PHP's flush method instead of the mentioned ASP. ;=)
0
 

Author Comment

by:bilgehanyildirim
ID: 13727263
sorry but I do not know anything about ASP. So could you tell me how this can work with PHP
0
 
LVL 32

Accepted Solution

by:
ldbkutty earned 2000 total points
ID: 13728266
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
 
LVL 32

Expert Comment

by:ldbkutty
ID: 13729039
:=)
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses
Course of the Month15 days, 14 hours left to enroll

850 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