Click to See Complete Forum and Search --> : Image PreLoading


wolfofthenorth
August 17th, 2003, 01:29 PM
I want to change some images on the mouseover event. When the event fires, my pictures are delayed because they have to be downloaded first. I am trying to preload them.

I have included this script in the head tag of my page. But it isn't working. Is this because the images aren't visible until mouseover?

Any help would be greatly appreciated!


<script language="javascript">
var i = new Image(); var j = new Image(); var k = new Image();
var l = new Image(); var m = new Image();
i.src = "images/abouton.bmp"; j.src = "images/homeon.bmp";
k.src = "images/productson.bmp"; l.src = "images/supporton.bmp";
m.src = "images/contacton.bmp";
</script>

Satishpp
August 19th, 2003, 12:33 PM
Check out this excellent page....

It will create the mouseover script for you.

http://javascript.internet.com/generators/preload-images.html

Satish

wolfofthenorth
August 19th, 2003, 12:37 PM
Thanks!