I want to make this clear to anyone reading this that this advice applies only to the 'original' circa 2006 version of lightbox (before version 2). Later versions 'play nice' with other onload events.
That's because Opera sees window.onload="something" and <body onload="whatever_else" . . . > as two separate events. All other browsers that I am aware of do not, so the second one (in this case the body event) cancels the first one.
Now, in this version of lightbox, at the end of lightbox.js we have:
Code:
addLoadEvent(initLightbox); // run initLightbox onLoad
which was meant to, but often fails to 'play nice' with other onload events, may be commented out:
Code:
//addLoadEvent(initLightbox); // run initLightbox onLoad
and then added to the body onload event (in this case, addition red):
Code:
<body bgcolor="#000000" onload="dynAnimation();initLightbox();" language="Javascript1.2">
The highlighted language attribute is invalid for the body tag, and deprecated in its use elsewhere, so should be removed.
Bookmarks