add addScript() function for loading JSON scripts (or any scripts, for that matter)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@984 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -106,3 +106,13 @@ OpenLayers.parseXMLString = function(text) {
|
||||
|
||||
return ajaxResponse;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {String} url
|
||||
*/
|
||||
OpenLayers.addScript = function(url) {
|
||||
var head = document.getElementsByTagName("HEAD")[0];
|
||||
var scriptElem = document.createElement("script");
|
||||
scriptElem.src = url;
|
||||
head.appendChild(scriptElem);
|
||||
};
|
||||
Reference in New Issue
Block a user