Is there some way to load a js file that got document.write inside?
i.e:
(function(){
var test = document.createElement('script');
test.type="text/javascript";
test.src="http://xxxxxxxxxxx/test.js";
document.getElementsByTagName('head')[0].appendChild(test);
})();
test.js:
document.write('test !');
it always returns alert error about document.write async ...
I figured out if i do:
test.js:
document.getElementsByTagName('body')[0].innerHTML = 'test !';
it works !
but in my case i can't have access to js file, then i would like to know if is there a way to do it? or i'll need to do a cross with php curl.
thanks.