diff options
author | Peter Grassberger <petertheone@gmail.com> | 2015-12-27 22:29:44 (GMT) |
---|---|---|
committer | Peter Grassberger <petertheone@gmail.com> | 2015-12-27 22:29:44 (GMT) |
commit | 5408e4f4b76a5dd54fbd49f5988104933e0d8cb2 (patch) | |
tree | 00c49fbd10d0b5fb8691e6e64c6d07568addd8e4 /www/js | |
parent | 0a690beb87c25445df31044d5887a87209157a8f (diff) |
add alert on ajaxError
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/apps.js | 7 |
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() { |