[thelist] JS: Preload images problem

Tyme nopun at bellsouth.net
Thu Mar 21 16:30:01 CST 2002


----- Original Message -----
From: "Hardacker, Andrew" <Andrew.Hardacker at Compuware.com>
To: <thelist at lists.evolt.org>
Sent: Thursday, March 21, 2002 4:51 PM
Subject: RE: [thelist] JS: Preload images problem


> <snip>
> Any idea why NN6.2 loads images so slowly with the script below?  Seems as
> though it is not preloading at all. (Seems fine with IE5.5)
> http://www.huntacpa.com/
> </snip>
>
> Tyme, actually, I didn't notice any delay at all in Netscape6.2, either
> before or after clearing browser cache. With this small number of images,
> you could try the brute force approach and just code four pairs of new
> Image/src statements, eliminating the loop and the evaluation of
> arguments.length.

TYME} Actually, I tried that too.  Perhaps I had the mouseover call wrong.
Is this correct?

arrPhotos = new Array;
arrPhotos[0] = new Image(190,290);
arrPhotos[0].src = "photo4.jpg";
arrPhotos[1] = new Image(190,290);
arrPhotos[1].src = "photo1.jpg";
arrPhotos[2] = new Image(190,290);
arrPhotos[2].src = "photo2.jpg";
arrPhotos[3] = new Image(190,290);
arrPhotos[3].src = "photo3.jpg";
arrPhotos[4] = new Image(190,290);
arrPhotos[4].src = "photo4.jpg";

function showSoftware() {
...
 document.getElementById("photo").src=arrPhotos[1];
 }

> Very nice pictures. But I have to admit that at first I thought I was
> looking at a site for a beach resort in Pennsylvania.

TYME} Hope it made you think of _postcards_ from beach resorts. (That was
the design look that I was going for.)  ...Yeah, my client/friend likes to
think that she is a beach resort rather than a CPA.  This is what she
wanted.  You should see the crap that I talked her out of.




More information about the thelist mailing list