Nice find Andrea! I never happened across that in my googling. Did you find any info on what versions of IE support the execScript function?
On 11/18/06, Andrea Ercolino <[EMAIL PROTECTED]> wrote: > > I've found a solution googling on "eval" which seems to work nicely. > > Check the updated test page: > http://www.mondotondo.com/aercolino/punchcard/test-getScript-error/index.html > > Here is the magical function, by Jeff Watkins: > > /** Execute a script in the global context. This installs all functions > defined in this script into the global scope, unless they are > explicitly created in different scopes. > > @param script the source of the JavaScript to evaluate > **/ > function installScript( script ) > { > if (!script) > return; > // Internet Explorer has a funky execScript method that makes this easy > if (window.execScript) > window.execScript( script ); > else > window.setTimeout( script, 0 ); > } _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
