I am trying to insert js files programmatically, using jquery and something like this:
var script = document.createElement( \'script\' ); script.type = \'text/ja
Document.write is ONLY for synchronous tasks when the html is loaded (for the very first time), never for asynchronous tasks like the one you are trying to do.