A Loader - something like Plesk

Posted on 2005-04-07
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 :)
Question by:bilgehanyildirim
    LVL 32

    Expert Comment


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

    Author Comment

    sorry but I do not know anything about ASP. So could you tell me how this can work with PHP
    LVL 32

    Accepted Solution

    well, even I dont know anything about ASP :=D , but that doesn't matter. :=)

    Here's the tested script:

          <TITLE>Splash Screen Sample</TITLE>
    <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) = "visible";
    function hideObject(obj) {
          if (ns4) {
                obj.visibility = "hide";
          if (ie4 || upLevel) {
       = "hidden";

                <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>
                                  <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>

          for($i = 0; $i < 10000; $i++)
                echo '<img src=""/><br/>';


    <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;

    ** 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.

    LVL 32

    Expert Comment


    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
    These days socially coordinated efforts have turned into a critical requirement for enterprises.
    This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    755 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

    19 Experts available now in Live!

    Get 1:1 Help Now