image load order

liunx

Guest
Im looking for a better way to load my images in a specific order.<br />
Does anyone know a better way than this?<br />
Preferably something in CSS or HTML....:) <head><br />
<script language="JavaScript"><br />
var loadingImage = false;<br />
function LoadImage(imageName,imageFile)<br />
{<br />
if ((!document.images) || loadingImage) return;<br />
loadingImage = true;<br />
if (document.images[imageName].src.indexOf(imageFile)<0)<br />
{<br />
document.images[imageName].src = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/imageFile;">http://www.webdeveloper.com/forum/archi ... imageFile;</a><!-- m --><br />
}<br />
loadingImage = false;<br />
}<br />
LoadImage('image0','number0.gif');<br />
</script><br />
</head><br />
<body><br />
<img name=image0 onLoad="LoadImage('image1','number1.gif')"><br />
<img name=image1 onLoad="LoadImage('image2','number2.gif')"><br />
<img name=image2 onLoad="LoadImage('image3','number3.gif')"><br />
;)<!--content-->sry to say this, but that cannot b done in html or css:(.<br />
-Dan<!--content-->images will load in the order they are in the code. So preloading with java script is the only answer.<!--content-->
 
Back
Top