Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKushagra Pandey <kushagra4296@gmail.com>2015-03-23 15:44:07 +0300
committerAtul Pratap Singh <atulpratapsingh05@gmail.com>2015-03-23 16:12:23 +0300
commit8847df101a13c9dfe2ff29b5758aedde4b630dd8 (patch)
treeeaa7443dbbb431b9415435f3e68ac52a6dfb4d40 /js/console.js
parent5f2d1f2f3639b7bd2e33495e547e4766c0e612f5 (diff)
Handling failed AJAX requests
Signed-off-by: Kushagra Pandey <kushagra4296@gmail.com>
Diffstat (limited to 'js/console.js')
-rw-r--r--js/console.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/js/console.js b/js/console.js
index 687c78e98c..a2b7bd44a2 100644
--- a/js/console.js
+++ b/js/console.js
@@ -173,6 +173,11 @@ var PMA_console = {
PMA_console.ajaxCallback(data);
} catch (e) {
console.log("Invalid JSON!" + e.message);
+ if(AJAX.xhr.status === 0 && AJAX.xhr.statusText !== 'abort') {
+ PMA_ajaxShowMessage($('<div />',{class:'error',html:PMA_messages.strRequestFailed+' ( '+AJAX.xhr.statusText+' )'}));
+ AJAX.active = false;
+ AJAX.xhr = null;
+ }
}
});