logging status and returning null if status != 200
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 6 Jul 2006 20:38:30 +0000 (20:38 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 6 Jul 2006 20:38:30 +0000 (20:38 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@4920 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/common/js/RemoteRequest.js

index 3561f1b..dc9da25 100644 (file)
@@ -149,14 +149,6 @@ function _remoteRequestCallback(id) {
        var object = _allrequests[id];
        if(object.cancelled) return;
 
-       /*
-       if( isXUL() ) {
-               try {
-                       dump('xmlhttprequest status = ' + object.xmlhttp.status + '\n');
-               } catch(e) {}
-       }
-       */
-
        if( object.xmlhttp.readyState == 4 ) {
                try {
                        object.callback(object);
@@ -262,11 +254,13 @@ RemoteRequest.prototype.getResultObject = function() {
        if(this.cancelled) return null;
        if(!this.xmlhttp) return null;
 
-       if( isXUL() ) {
-               try {
-                       dump('xmlhttprequest status = ' + this.xmlhttp.status + '\n');
-               } catch(e) {}
-       }
+       try {
+               if( this.xmlhttp.status != 200 ) {
+                       try{dump('! Returning NULL.  HTTP STATUS = ' + this.xmlhttp.status);}catch(e){}
+                       return null;
+               }
+       } catch(e) {}
+
 
        this.event(null);