Pre-Loading Message | JavaScriptSource

Pre-Loading Message

Robert Paulson May 25, 2005


Use this script to warn your visitors that your page is loading. Short but effective.


Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: preLoadingMessage.js


Paste this code into your external CSS file or in the <style> section within the HEAD section of your HTML document.


Paste this code into the HEAD section of your HTML document.

Leave a Response


Simplest and easiest way to display loading message.. Thanks

Yatin Jun 22, 2016

I would set the body tag to style="display:none;", and give it an id, like id="pageBody" and then at the bottom, under document.getElementById("loading").style.display="none";[br /]add[br /]document.getElementById("pageBody").style.display="";[br /]and that will make the whole body visible at once.

Joe Tricarico Nov 8, 2008

Your question is beyond the scope of these comments. You will need to post it over on [a href=""]the JavaScript forum[/a]. Thanks!

Lee Oct 31, 2008

Thanks so very much for this simple but precise script. After dealing with tons of weirdness of the old &#39;onload&#39; that firefox killed, my final attempt to make a page-loader was to browse the JavaScript online sources. What a lifesaver.[br /][br /]Plus I was able to easily add a fade out with jQuery!

ISOSCELES Sep 7, 2008

The script is short and effective.[br /]and simple to use in a site, it works fine.[br /]thanks

Hein Kuiper Sep 4, 2008