Changeset 2008
- Timestamp:
- 02/12/10 09:40:11 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/calendar/js/edit_exmail.js
r1796 r2008 217 217 function loadScript(scriptPath){ 218 218 219 if(! connector)220 throw new Error("Error : Connector is not loaded.");221 222 if( connector.oxmlhttp==null)223 connector.createXMLHTTP();219 if(!expresso.connector) 220 throw new Error("Error : expresso.connector is not loaded."); 221 222 if(expresso.connector.oxmlhttp==null) 223 expresso.connector.createXMLHTTP(); 224 224 225 225 if (document.getElementById('uploadscript_'+scriptPath)) { … … 227 227 } 228 228 229 connector.oxmlhttp.open("GET", scriptPath, false);230 connector.oxmlhttp.setRequestHeader('Content-Type','text/plain');231 connector.oxmlhttp.send(null);232 if( connector.oxmlhttp.status != 0 && connector.oxmlhttp.status != 200 || connector.oxmlhttp.status == 0 &&connector.oxmlhttp.responseText.length == 0)233 throw new Error("Error " + connector.oxmlhttp.status + "("+connector.oxmlhttp.statusText+") when loading script file '"+scriptPath+"'");229 expresso.connector.oxmlhttp.open("GET", scriptPath, false); 230 expresso.connector.oxmlhttp.setRequestHeader('Content-Type','text/plain'); 231 expresso.connector.oxmlhttp.send(null); 232 if(expresso.connector.oxmlhttp.status != 0 && expresso.connector.oxmlhttp.status != 200 || expresso.connector.oxmlhttp.status == 0 && expresso.connector.oxmlhttp.responseText.length == 0) 233 throw new Error("Error " + expresso.connector.oxmlhttp.status + "("+expresso.connector.oxmlhttp.statusText+") when loading script file '"+scriptPath+"'"); 234 234 235 235 var head = document.getElementsByTagName("head")[0]; … … 237 237 script.id = 'uploadscript_'+scriptPath; 238 238 script.type = 'text/javascript'; 239 script.text = connector.oxmlhttp.responseText;239 script.text = expresso.connector.oxmlhttp.responseText; 240 240 head.appendChild(script); 241 241 return;
Note: See TracChangeset
for help on using the changeset viewer.