Board Logo

How to preload menu images
donaldsa - 8/15/2002 at 07:15 PM

I have a page that contains a bunch of thumbnail pictures and a menu. When the page loads, the menu is drawn, then all of my thumbnail pictures are individually drawn, THEN the images for the menu are downloaded and drawn onto the menu. Is there a way for the menu images (down and right arrows, and misc of the .gif) to be download first?

As my thumbnail pictures are downloading, the menu works fine - but the images are missing until the very end.

Don Sanders

tigra - 8/16/2002 at 06:01 AM

You can use some of the standard image preload methods:

<script language="JavaScript">
var o_image1 = new Image();
o_image1.src = 'some_path/your_icon.gif';
var o_image2 = new Image();
o_image2.src = 'some_path/another_icon.gif';
[... and so on for all images]

Back to forum: