post loading javascript

On July 29, 2008, in javascript, by nils

var postscript = document.createElement("script");
postscript.src="/path/to/some.js";
postscript.type="text/javascript";
document.getElementsByTagName("head")[0].appendChild(
postscript);

this loads the some.js and “compiles” it after execution

Tagged with:
 

Leave a Reply