1) CODE TITLE: Import Script
2) AUTHOR NAME/NOTES: Trinithis
3) DESCRIPTION: Allows you to import external scripts using JS.
Example:
http://trinithis.awardspace.com/impo...ortScript.html
importScript source code:
http://trinithis.awardspace.com/impo...mportScript.js
Code:function importScript(u) {
var s = document.createElement("script");
s.type = "text/javascript";
s.src = u;
document.getElementsByTagName("head")[0].appendChild(s);
}
I've tested on FF-1.0 and IE-6.0 and the head tag exists even in pages without a head tag explicitly defined. It should be noted that the imported script is evaluated after the current script tag, but before the following (if any) script tags.

