From: erickson Date: Fri, 6 Mar 2009 03:45:32 +0000 (+0000) Subject: try the various xhr loading techniques X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=01a4e1e1a8cc48cf6049b8b53beb5f9258ddaa71;p=opensrf%2Fbjwebb.git try the various xhr loading techniques git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1673 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/javascript/opensrf_xhr.js b/src/javascript/opensrf_xhr.js index 76d8473..8cace89 100644 --- a/src/javascript/opensrf_xhr.js +++ b/src/javascript/opensrf_xhr.js @@ -27,7 +27,16 @@ var OSRF_POST_CONTENT_TYPE = 'application/x-www-form-urlencoded'; 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() {