PDA

View Full Version : Running 2 scripts problem



zenfor
11-25-2009, 06:11 PM
1) Script Title: Marquee scroller & Lightbox photo viewer

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

3) Describe problem: I can't run both scripts at the same time. If I disable the scroller then the lightbox will run but it will not run when the scroller does. Appreciate any help.

jscheuer1
11-25-2009, 07:54 PM
At the end of the lightbox.js script (use a plain text editor like NotePad), change:


addLoadEvent(initLightbox); // run initLightbox onLoad

to:


if (window.addEventListener)
window.addEventListener('load', initLightbox, false);
else if (window.attachEvent)
window.attachEvent('onload', initLightbox);

There could also be other problems though. If so, the best bet would be to upgrade to Lightbox v2.04a:

http://home.comcast.net/~jscheuer1/side/lightbox2.04a/

zenfor
11-25-2009, 08:29 PM
Thanks John, I upgraded to the new script and it works fine.