michel reynard wrote:
You're right but I only have the large images. The only things I'm
looking for is not to have to download the image twice.
The idea is to see all the pictures in the thumbnail and be able to
enlarge one to see the details without having to wait for the loading.
Then you're probably looking to pre-load the images. On the page that
loads *small* thumbnails, add the following code:
<script type="text/javascript">
var imageCacher = new Image();
var myImages = [ 'image1.jpg', 'image2.jpg', 'image3.jpg' ... ];
for (var i = 0; i < myImages.length; i++) {
imageCacher.src = myImages[i];
}
</script>
Now, as your *small* thumbnails load, the browser will be getting and
caching (subject to the rules of the server, any proxies and the browser's
own cache settings) each image you want. When the user clicks a thumbnail,
the image *may* already be loaded. If not, you've lost nothing because you
downloaded *small* thumbnails, if it is cached, it will appear almost
instantly.
It seems that you want to thumbnail all your large images in case the user
decides to click any single one of them. This seems like a really bad
idea. I don't want to wait for 1MB of images to download so I can enlarge
one more quickly.
--
| Grant Wagner <gw*****@agricoreunited.com>
* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html
* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp
* Netscape 6/7 DOM Reference available at:
*
http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
*
http://www.mozilla.org/docs/web-deve...upgrade_2.html