Re: stand-alone image preload?
by "Rossi Designs" <webmaster(at)rossidesigns.net>
|
Date: |
Thu, 27 Apr 2000 13:40:03 -0400 |
To: |
<pbabcock(at)bgsgroup.com>, <hwg-languages(at)hwg.org> |
References: |
felix |
|
todo: View
Thread,
Original
|
|
<script language="javascript">
<!--
var MyImages = Array("pic1.gif","pic2.gif", ... ,"lastpic.gif");
function preload(img_array) {
if (document.images) {
var pl_img = new Array();
for (x=0;x<img_array.length;x++) {
pl_img[x] = new Image();
pl_img[x].src=img_array[x];
}//end for loop
}//end if
}//end function
// -->
</script>
<body onLoad="preload(MyImages);">
You might have to tweak it a little because I made it up as I went along. Is
that what you meant?
Might be usefull for preloading images for the next page etc.
Rossi Designs
PO Box 1084
Holly Hill, FL 32125-1084
Phone : (904) 226-8979
URL : http://rossidesigns.net
----- Original Message -----
From: Phil Babcock <pbabcock(at)bgsgroup.com>
To: <hwg-languages(at)hwg.org>
Sent: Thursday, April 27, 2000 11:37 AM
Subject: stand-alone image preload?
| Hi all
|
| Can anyone recomend a stand-alone javascript image preloader? I say
| stand-alone because all of the ones I have found seem to be used in
| conjunction with a rollover script. What if I am not doing a rollover?
| How do I just preload any image(s) I like?
|
| tia!
|
| Phil Babcock
| Lead Web Designer
| BGS Group Inc.
|
|
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA