Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image preload on slow server

Status
Not open for further replies.

javagirl

Programmer
Feb 21, 2001
5
US
Is there anything to be done to prevent the "imgXX is not defined" error on a rollover when the server is slow serving up the images? We know that we have a slow server (client owned, so no help there). The rollovers are navigation buttons. Holding your mouse over them while the page is loading, causes the error.

I'm doing the image preload at the top of the <head>. I am also testing &quot;if (document.images
.complete)&quot; before doing the rollover and it's working in most cases, except for a graphics-intensive page. Shouldn't that prevent the rollover image swap if the image is not loaded? I know I'm hitting it, cause I put in an alert msg there.

I've found many good solutions here, but I'm at a loss as to what to try next... other than a redirect while the images are loading... which is not an option.

Thanks in advance for any suggestions.
 
don't invoke any of your rollover functionality until the onload event of the body has fired. not sure if this'll do it, but you can try :) jared@aauser.com -
 
Major cheat if your buttons are repeatedly used on many pages. Have a low-intensity home page (your basic &quot;click here to enter site&quot; page) which loads all your images and &quot;displays&quot; them scaled to 1x1 pixels. Basically, they won't be visible, but they'll be ready to use on further pages.

Rose/Miros
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top