ok when using getScript() with a remote domain there are 2 errors in IE6 one it aborts the js file being returned and 2 it says invalid argument. I have noticed other bug reports indicating the same thing and they where patched in 1.2.5 however I dont think they where done right
in this one
reference to other ticket:http://dev.jquery.com/ticket/2709
They indicated on using
'''head.insertBefore( script, head.firstChild );'''
which works but doesnt actually do what you want it to do which is add the code at the end. to make it add the code at the end you need to do the following
the insert at the end is fine with
'''head.insertChild(script)'''
thats ok the issue was with the head.removeChild(script) would fail what you want to do is this
'''script.parentNode.removeChild(script)'''
that allows the script to be added at the end of the head tag where you want it so that all other scripts run before and you can run stuff in the custom added script and works with basehref as well :)
that code above needs to be applied to every location where you use head.removeChild(script); so thats on lines: 644, 2621, 2672 see link below for reference to this code
Reference: http://groups.google.com/group/alt.comp.lang.javascript/browse_thread/thread/2380af22f06b05a6/475ae9c43505c581
that is only the first problem now to deal with why IE6 aborts the call to test.js on a remote server (no other browser does) well it seems to be an issue of timing so in the jQuery core on line 2677 is this code head.appendChild(script) i have replaced that with this
var IEAbortedFix = function(){
head.appendChild(script);
}
setTimeout(IEAbortedFix,10);
and it seems that for the timeout it can be any number between 1 and 23. Anything less or more causes an error on the removeChild code
I have included a test case but you will need 2 servers and need to rename the calls to http://www.sitea.com and http://www.siteb.com to the 2 servers you are using.