R
Razzbar
I need to be able to conditionally load a remote script, using
the "<script src=..." syntax. Or some other way. I've seen
people writing about using the document.write method, but it's
not working like I want it to.
What's happening is, if I do a document.write(scriptcall), the
script loads, although sometimes very slowly... (?). Any inline
code is executed (I used an alert to verify that the script is
loading). But all the previous content of the page goes 'poof'.
If I look at the source of the page in this state, all I see
is the script tag I've document.written. I've tried using
document.close after writing the tag, and not using it, but
the results are the same. A blank page.
Wish there was a "loadscript(src)" function I could use.
Anybody know how to do what I want to do?
the "<script src=..." syntax. Or some other way. I've seen
people writing about using the document.write method, but it's
not working like I want it to.
What's happening is, if I do a document.write(scriptcall), the
script loads, although sometimes very slowly... (?). Any inline
code is executed (I used an alert to verify that the script is
loading). But all the previous content of the page goes 'poof'.
If I look at the source of the page in this state, all I see
is the script tag I've document.written. I've tried using
document.close after writing the tag, and not using it, but
the results are the same. A blank page.
Wish there was a "loadscript(src)" function I could use.
Anybody know how to do what I want to do?