ph****************@horus-si.com wrote:
I want to dynamically include a .js file i.e do something like that :
is it possible with internet explorer 6 ?
Yes:
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'whatever.js';
document.getElementsByTagName('head')[0].appendChild(script);
But loading of the script happens asynchronously so don't try to call
functions directly after the appendChild call.
And while that approach works with IE 6 (and back to IE 5 I think), with
new Mozilla versions and with latest Opera 8, browsers had difficulties
implementing that so there are old Mozilla versions and early Opera 7
versions where it does not work.
--
Martin Honnen
http://JavaScript.FAQTs.com/