View Full Version : Lightbox quit working

09-28-2007, 04:33 PM
1) Script Title: Lightbox image viewer

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/lightbox/index.htm

3) Describe problem:
I was making small edits to my site, unrelated to any component of the lightbox script. Could someone please look at the code on these pages and tell me what might be wrong. It was working perfectly. I updated the left nav using a library item in Dreamweaver and that's it.




09-29-2007, 04:18 AM
Works in Opera (which now, unlike any other browser that I know of, allows both body onload and window onload), not in FF, probably not in IE. You have an onload conflict. I'd try, where you have this:

<body onLoad="MM_preloadImages('../imag . . .

adding (red):

<body onLoad="initLightbox();MM_preloadImages('../imag . . .

This could mess things up in recent Opera browsers though, by initializing lightbox twice. Just to be on the safe side, I would recommend also removing this:

addLoadEvent(initLightbox); // run initLightbox onLoad

from your lightbox.js file.