From: erickson Date: Thu, 17 Aug 2006 19:49:16 +0000 (+0000) Subject: fixed typo and added commented out debug line X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7aa89bfbc15985dd4316c53aa183075c9b0472eb;p=evergreen%2Fpines.git fixed typo and added commented out debug line git-svn-id: svn://svn.open-ils.org/ILS/trunk@5568 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/opac/common/js/RemoteRequest.js b/Open-ILS/web/opac/common/js/RemoteRequest.js index e9d4b2580f..cefe1549d4 100644 --- a/Open-ILS/web/opac/common/js/RemoteRequest.js +++ b/Open-ILS/web/opac/common/js/RemoteRequest.js @@ -237,6 +237,8 @@ RemoteRequest.prototype.send = function(blocking) { if(isXUL() && this.secure ) dump('SECURE = true\n'); + this.url = url; + try { if(blocking) this.xmlhttp.open(this.type, url, false); @@ -278,6 +280,15 @@ RemoteRequest.prototype.getResultObject = function() { var failed = false; var status = null; + this.event(null); + + /* DEBUG + try { + dump(this.url + '?' + this.param_string + '\n' + + 'Returned with \n\tstatus = ' + this.xmlhttp.status + + '\n\tpayload= ' + this.xmlhttp.responseText + '\n'); + } catch(e) {} + */ try { status = this.xmlhttp.status; @@ -286,17 +297,15 @@ RemoteRequest.prototype.getResultObject = function() { if( failed ) { if(!status) status = ''; - try{dump('! NETWORK FAILURE. HTTP STATUS = ' +status);}catch(e){} + try{dump('! NETWORK FAILURE. HTTP STATUS = ' +status+'\n');}catch(e){} if(isXUL()) throw new NetworkFailure(status, this.param_string); else return null; } - - this.event(null); - var text = this.xmlhttp.responseText; - if(text == "" || text == " " || text == null) null; + + if(text == "" || text == " " || text == null) return null; var obj = JSON2js(text); if(!obj) return null;