On Tue, Oct 30, 2007 at 05:07:07PM -0000, cklester wrote:
> snippets as the page is built. I need to be able to add multiple
> functions to an event handler. For instance, if there are two forms on
> need to be able to append their own function to the list of functions
> run when the window's 'load' event is fired.
> //...form 1
> YAHOO.util.Event.addListener(window, "load", init1);
> //...form 2
> YAHOO.util.Event.addListener(window, "load", init2);
> //...form n
> YAHOO.util.Event.addListener(window, "load", initn);
> This seems to be working! Is this an acceptable and valid methodology?
Sure, as long as your application does not require that the three init
functions are executed in the order that they were defined.