IE breaks on this -- probably because document.write () delays the onload, but

appending script elements doesn't. (Hooray for IE.) rolling this back and 
reopening the ticket until I can work out the best workaround for this.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1377 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-08-25 18:51:01 +00:00
parent 84d4e70fa5
commit b6200568d4

View File

@@ -108,12 +108,9 @@ if (typeof(_OPENLAYERS_SFL_) == "undefined") {
catch (e) { start=0; }
for (var i = start; i < jsfiles.length; i++) {
var currentScriptElem = document.createElement('script');
currentScriptElem.type = 'text/javascript';
currentScriptElem.src = host + jsfiles[i];
document.getElementsByTagName("head")[0].appendChild(currentScriptElem);
var currentScriptTag = "<script src='" + host + jsfiles[i] + "'></script>";
allScriptTags += currentScriptTag;
}
document.write(allScriptTags);
})();
}