[Opensrf-commits] r1673 - trunk/src/javascript (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Mar 5 22:45:34 EST 2009
Author: erickson
Date: 2009-03-05 22:45:32 -0500 (Thu, 05 Mar 2009)
New Revision: 1673
Modified:
trunk/src/javascript/opensrf_xhr.js
Log:
try the various xhr loading techniques
Modified: trunk/src/javascript/opensrf_xhr.js
===================================================================
--- trunk/src/javascript/opensrf_xhr.js 2009-03-06 03:32:13 UTC (rev 1672)
+++ trunk/src/javascript/opensrf_xhr.js 2009-03-06 03:45:32 UTC (rev 1673)
@@ -27,7 +27,16 @@
OpenSRF.XHRequest = function(osrf_msg, args) {
this.message = osrf_msg;
this.args = args;
- this.xreq = new XMLHttpRequest(); /* XXX browser check */
+ try {
+ this.xreq = new XMLHttpRequest();
+ } catch(e) {
+ try {
+ this.xreq = new ActiveXObject("Msxml2.XMLHTTP");
+ } catch (e2) {
+ this.xreq = new ActiveXObject("Microsoft.XMLHTTP");
+ }
+ }
+
}
OpenSRF.XHRequest.prototype.send = function() {
More information about the opensrf-commits
mailing list