From 3c5cd76d26fd9370ae7f46cdfc735169f8dab4a1 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Fri, 11 Mar 2011 17:00:02 +0100 Subject: [PATCH] Handler for stopped AJAX requests --- adminer/static/functions.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 30de8a52..e5c3df66 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -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);