On 11/10/06, Dave Methvin <[EMAIL PROTECTED]> wrote: > > >>> As the loading of both scripts is asynchronous, the second one > >>> could be started before the neccessary functions are available. > >>> Any idea or workaround? > >> > >> If you can attach a readyState handler to the first script, that can > >> be your cue to run the function or load the second script that needs > >> the first one. > > > > Unfortunately, I can't. The script comes from an external domain, so > > I cannot use XHR to load it :( > > You can create a script element using document.createElement, set a handler > for readyState, and then set a src to get it to load. It should work for any > external script. jQuery uses it in the .ready() event setup if you need an > example.
Uh, really interesting. Do you know if this will work crossbrowser? jQuery uses it only for IE. Thanks again. -- Choan <http://choangalvez.nom.es/> _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
