summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorPeter Grassberger <petertheone@gmail.com>2015-12-27 22:29:44 (GMT)
committerPeter Grassberger <petertheone@gmail.com>2015-12-27 22:29:44 (GMT)
commit5408e4f4b76a5dd54fbd49f5988104933e0d8cb2 (patch)
tree00c49fbd10d0b5fb8691e6e64c6d07568addd8e4 /www
parent0a690beb87c25445df31044d5887a87209157a8f (diff)
add alert on ajaxError
Diffstat (limited to 'www')
-rw-r--r--www/js/apps.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/www/js/apps.js b/www/js/apps.js
index 99ae50d..59ab50f 100644
--- a/www/js/apps.js
+++ b/www/js/apps.js
@@ -97,6 +97,13 @@ function apps_init() {
apps_select(locationHrefValue());
}
});
+
+ $(document).ajaxError(function(event, jqXHR, settings, thrownError) {
+ var data = jqXHR.responseText;
+ var errorString = $(data).find('ErrorString').text();
+ var ResponseCode = $(data).find('ResponseCode').text();
+ alert(ResponseCode + ': ' + errorString);
+ });
}
function apps_cleanup() {