[thelist] Smart Image preloading

warbassedesign.com info at warbassedesign.com
Mon Apr 1 12:11:00 CST 2002

Hello Daniel,
Here is a script I originally found at javascrpts.internet.com.  Hope this
will help.  Works in NS also.

Good Luck,
Philip Warbasse


  1.  Copy the coding into the HEAD of your HTML document
  2.  Add the onLoad event handler into the BODY tag
  3.  Put the last coding into the BODY of your HTML document  -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document  -->


<!-- Original:  Gilbert Davis -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function loadImages() {
if (document.getElementById) {  // DOM3 = IE5, NS6
document.getElementById('hidepage').style.visibility = 'hidden';
else {
if (document.layers) {  // Netscape 4
document.hidepage.visibility = 'hidden';
else {  // IE 4
document.all.hidepage.style.visibility = 'hidden';
//  End -->

<!-- STEP TWO: Insert the onLoad event handler into your BODY tag  -->

<BODY OnLoad="loadImages()">

<!-- STEP THREE: Copy this code into the BODY of your HTML document  -->

<div id="hidepage" style="position: absolute; left:5px; top:5px;
background-color: #FFFFCC; layer-background-color: #FFFFCC; height: 100%;
width: 100%;">

<table width=100%><tr><td>Page loading ... Please

<!-- put the rest of your page contents here -->

<!-- Script Size:  1.20 KB -->
----- Original Message -----
From: "Daniel Fascia" <danfascia at totalise.co.uk>
To: <thelist at lists.evolt.org>
Sent: Monday, April 01, 2002 7:11 AM
Subject: [thelist] Smart Image preloading

> Its really annoying when a site preloads images badly... for example when
you can see the images from an article appearing before the navigation
system images.
> I am trying to make a script that will preload the navigation images and
NOT allow the page to be displayed until they have loaded.
> Whatkind of even handlers etc should I be using, surely not just onload
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !

More information about the thelist mailing list