[thelist] [javascript] Window.onload > YUI vs. Prototype
Matt Warden
mwarden at gmail.com
Mon Apr 7 16:33:47 CDT 2008
On Mon, Apr 7, 2008 at 4:36 PM, Paul Bennett <Paul.Bennett at wcc.govt.nz> wrote:
> Load lightbox files
> lightbox initialized by initLightbox();
> global var set for common.js to check for
> Load common.js
> window.onload called again and addListener used to attach methods to various events / elements
> addListener used to reload lightbox when var is set:
> // load lightbox again if the file has been loaded
> if(typeof lbLoaded == 'number'){
> YAHOO.util.Event.addListener(document.body, 'load', initLightbox);
>
>
> }
I am not sure what you mean by window.onload being called again. If
the load event has already fired before you have added initLightbox to
the handler, then yes it will not call that function.
Perhaps I should just stay quiet since I have no idea what lightbox is...
--
Matt Warden
Cincinnati, OH, USA
http://mattwarden.com
This email proudly and graciously contributes to entropy.
More information about the thelist
mailing list