preload images question

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
jhilden
Beginner
Beginner
Posts: 7
Joined: Tue Sep 27, 2005 10:26 pm

preload images question

Post by jhilden »

I just ran across your prelaodmenuimages.js bolt-on and I'm a big fan, but I have a quick question about it.

calling drawMenus() before we call

Code: Select all

<script language="JavaScript1.2" type="text/javascript" src="/js/menu/preloadmenuimages.js"></script>
doesn't make sense to me.

If we are preloading the images why are we drawing the menu first? I've dropped the script into my code call just after my drawMenus() call and I can still grab a menu, the menu opens but the images within the menu still take a couple of seconds to populate (text comes through right away obviously).

Any tips would be greatly appreciated.

Cheers!
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

The menu is only drawn to memory, not actually drawn to the page at this stage. The prelaodmenuimages function will try and pre-load the images before the page has been fully loaded.

This should result in a much more efficient page loading procedure
Post Reply