View Single Post
  #7 (permalink)  
Old Jul 12th, 2007, 13:39
JennyChaos JennyChaos is offline
Junior Member
Join Date: Jul 2007
Location: South Coast
Age: 35
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Forcing JavaScript to load before images?

I don't quite understand that. If there was a way to preload the script into the browser cache before everything else is loaded, I would still have the links - surely if someone had JavaScript disabled, only the 'rel' attribute in the <a> tags would be ignored and the image would simpy open on a new page (obviously not ideal as a visitor would have to hit the 'back' button to return to the page with the thumbnails but better than not being able to see the full-size images at all)?

I must admit, I have never written a single line of JavaScript in my life, but from looking at the code inserted by DW if I add rollovers, I have been able to figure out
  1. how the function is defined which preloads the images
  2. how this function is called from the body tag through the onLoad attribute
Isn't there a similiar way in which the script can be preloaded before the content of the page is displayed?

Thanks,

Jenny

P.S.: I've looked at Lightbox - looks good to me, so if there isn't a solution for my problem, I'll go for that one instead.
Reply With Quote