Hi all, I've prepared a script to add and launch functions from an external JS file in synchronous manner. It's launched from an anchor on the page. (it's basing on some code from dynapi-dev list.) It works in IE5,IE5.5 very good. In NS4.7 it works once and crash sometimes when launched again. In NS6 nothing happens while in IE6 generates an error. Any ideas how to add DOM support and NS4.7 stability...
//loading external scripts function loadf(srclib,obj) { var myscript; if (is.ns4) location.href = srclib; else if (is.ie) { myscript=document.createElement('script'); myscript.src=srclib; myscript.type='text/javascript'; myscript.defer=true; document.getElementsByTagName('head')[0].appendChild(myscript); } launch(obj); }; function launch(obj) { if (!window[obj]) { status='Loading an external file...'; setTimeout("launch('"+obj+"')",20); } else { ldata(); //function added from a loaded external file var tcl = new MyWidget(); DynAPI.document.addChild(tcl); status='External file completely loaded.'; } }; /mark najmajer _______________________________________________ Dynapi-Help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dynapi-help