View Single Post
Join Date: Jun 2005
Posts: 4
Reputation: bitfiddler is an unknown quantity at this point 
Solved Threads: 0
bitfiddler bitfiddler is offline Offline
Newbie Poster

Re: Need to Preload many Images (and show a wait screen)

 
0
  #3
Jun 30th, 2005
Originally Posted by Troy
I wrote a system to do this a few years ago. You can look at what I did by going to http://www.mvirony.com/, then navigate to the Boat Layout page. When you hit the home page, make sure you allow popups for the site. There aren't any ads or anything, but the Boat Layout page uses a popup window to tell the user to wait while images load--and you are especially interested in this part. Once images are loaded, the popup window closes automatically. (I coded this solution before popup ads were a big problem, and thus, before everybody had popup blockers.)

Simply view the source of the page to look at my javascript. Notice near the top of the script, I pop a window--this window loads a small page telling the user to please wait while images load. Then look at the LoadPhotos() function. This creates a javascript image variable for each of the large images--there are 3 which is why I loop 3 times. Notice I named my three images layout1.jpg, layout2.jpg, and layout3.jpg. Finally, notice that on window load (window.onload), I close the popup window.

I hope you are able to make sense of it to create your own solution. It works great, except if I were coding this today, I'd use a DIV that I dynamically display then hide once the images are loaded. Unfortunately, ad spammers have killed all legitimate use of popup windows.
I'm fairly new to this "java" thing but I think I can get thru your code all right.
BTW, since it is "today"....how would you use the DIV ?
Did u look at the images I am loading at
http://www.outingsunlimited.com
????
Reply With Quote