From 01a4e1e1a8cc48cf6049b8b53beb5f9258ddaa71 Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 6 Mar 2009 03:45:32 +0000 Subject: [PATCH] try the various xhr loading techniques git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1673 9efc2488-bf62-4759-914b-345cdb29e865 --- src/javascript/opensrf_xhr.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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() { -- 2.43.2