the current version (2.2) isn't made for injection (what we could do for example if we have an ajax tabpanel)
But 2.3 which is about the get released i think says this in the code: // If the library is being injected after window.onload, it // is not safe to document.write the script tag. Detecting // this state doesn't appear possible, so we expect a flag // in YAHOO_config to be set if the library is being injected. if (("undefined" !== typeof YAHOO_config) && YAHOO_config.injecting) { I cant find much info about that injection flag currently anywhere else. But i guess every lib that uses yahoo should upgrade asap to the 2.3 (now in RC: http://sourceforge.net/project/showfiles.php?group_id=165715) and should do something like: YAHOO_config = { listener: mycallback // this is already something you can do in 2.2 if needed. }; YAHOO_config.injecting = true; and only when we are in an ajax request.. johan