]> git.joonet.de Git - adminer.git/commitdiff
Handler for stopped AJAX requests
authorJakub Vrana <jakub@vrana.cz>
Fri, 11 Mar 2011 16:00:02 +0000 (17:00 +0100)
committerJakub Vrana <jakub@vrana.cz>
Fri, 11 Mar 2011 16:00:02 +0000 (17:00 +0100)
adminer/static/functions.js

index 30de8a5221963a84c00658d56f3dd2f707ba3da8..e5c3df661f5e706f2dab58cd377124fe6f0187e8 100644 (file)
@@ -249,7 +249,11 @@ function ajax(url, callback, data) {
                                if (title) {
                                        document.title = decodeURIComponent(title);
                                }
-                               callback(xmlhttp.responseText);
+                               if (xmlhttp.status) {
+                                       callback(xmlhttp.responseText);
+                               } else {
+                                       setHtml('loader', '');
+                               }
                        }
                };
                xmlhttp.send(data);