470,855 Members | 1,163 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,855 developers. It's quick & easy.

Making a script tag in IE and NN

gsb
I am trying to create a script tag:
script = document.createElement('script');
....and assign its script (IE) :
script.txt = " ...my script... ";

But this does not work in NN.

Any help?
Where to find online documentation on 'Script Tag'?

Thanks,

gsb
Jul 20 '05 #1
1 1058
gsb wrote:
I am trying to create a script tag:
script = document.createElement('script');
...and assign its script (IE) :
script.txt = " ...my script... ";

But this does not work in NN.

Any help?
Where to find online documentation on 'Script Tag'?

Thanks,

gsb


This could be tough to find a cross-browser solution. What version of
NN are you trying for? The script.text member is supposed to exist in
NN, but be read only. Also, it's use is goofy, and not known to
actually work the way you want in IE5. Your solution is different,
because you are creating it dynamically.

You _could_ use eval() or execScript() (IE only), but I suppose the
proper way to answer this question is:

What are you trying to do? It seems that there is probably a better
solution to your problem than dynamically creating a new SCRIPT node.

Brian

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by |-|erc | last post: by
7 posts views Thread by extremerep | last post: by
3 posts views Thread by john.enevoldson | last post: by
11 posts views Thread by Hari Sekhon | last post: by
1 post views Thread by HACKhalo2 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.