I hope you don't mind me asking here as its not a dynapi issue, I'm
having problems with my code, and noticed that you seemed to have got
around this - dynapi/dynapi3x/src/ext/library.js
I'm finding that the 'complete' readyState isn't fireing, just 'loading'
and 'loaded'. This script is to dynamically load data at user's request.
To get around it I currently have the loaded script called a function
loaded(); which tells the main program its loaded and execute func();
But I really want to decouple the loading script from the main block
with something like below- (please ignore browser detection etc, its
just a test file, I'm only interested in ie5.5+ at this stage):
function getConcept(name, func) {
if (document.getElementById("concept_"+name)) return;
var s = document.createElement("SCRIPT");
s.src = '/mdf/vocabulary/'+name + '.js';
s.type = 'text/javascript';
s.defer = true;
if(document.all) {
s.onreadystatechange = function() {
if (s.readyState == 'complete') {
alert("complete");
func();
}
}
} else {
s.onload = func;
}
document.getElementsByTagName('HEAD')[0].appendChild(s);
}
-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[EMAIL PROTECTED]/