PDA

View Full Version : another external .js problem...


joeframbach
04-23-2003, 02:29 AM
i do this onLoad in my index page:
sc=document.createElement("script");
sc.src="exTest.js";
sc.type="javascript";
document.getElementsByTagName("head")[0].appendChild(sc);

here is my exTest.js file:
alert("it works!");


now... why wont it work?
i alerted the document.head to make sure the <script> tag was there...
hmmm...

Vladdy
04-23-2003, 03:00 AM
type should be text/javascript, but I do not think that is your problem. what browser are you using?

joeframbach
04-23-2003, 03:08 AM
ie6

it works!