javascript probs.....

Status
Not open for further replies.

sridhar8310

Broken In
Hi,
I need help with regard to the placement of script from scripts.... Bellow is my code snipit.

[somediv].innerHTML = "<SCRIPT language='javascript'
src='abc.js' defer='true'></SCRIPT>"

My intention is to download a javascript file on demand. But the javascript file is not initilaized in the scripting environment. Although it is downloaded in the cache by the browser, no doubt about it.....

One more thing is that, sometimes when I use document.write(), it just adds the content to the existing document....and sometimes it just rewrites the whole document with the content... How do I prevent the latter one fom happening.

P.S: I even tried to change the </script> to <\/script> int the above snipit, but it still doesn't work.
 
Status
Not open for further replies.
Top Bottom