diff --git a/common/js/xml_handler.js b/common/js/xml_handler.js
index 5d0d9a940..c5a54d6d5 100644
--- a/common/js/xml_handler.js
+++ b/common/js/xml_handler.js
@@ -134,11 +134,13 @@
// Hide the waiting message and display an error notice.
clearTimeout(wfsr_timeout);
waiting_obj.hide().trigger("cancel_confirm");
+ var error_info;
+
if ($(".x_modal-body").size()) {
- var error_info = xhr.status + " " + xhr.statusText + " (" + textStatus + ")" + "
" + xhr.responseText + "
";
+ error_info = xhr.status + " " + xhr.statusText + " (" + textStatus + ")" + "
" + xhr.responseText + "
";
alert("AJAX communication error while requesting " + params.module + "." + params.act + "
" + error_info);
} else {
- var error_info = xhr.status + " " + xhr.statusText + " (" + textStatus + ")" + "\n\n" + xhr.responseText;
+ error_info = xhr.status + " " + xhr.statusText + " (" + textStatus + ")" + "\n\n" + xhr.responseText;
alert("AJAX communication error while requesting " + params.module + "." + params.act + "\n\n" + error_info);
}
};
@@ -232,8 +234,15 @@
var errorHandler = function(xhr, textStatus) {
clearTimeout(wfsr_timeout);
waiting_obj.hide().trigger("cancel_confirm");
- var error_info = xhr.status + " " + xhr.statusText + " (" + textStatus + ")";
- alert("AJAX communication error while requesting " + params.module + "." + params.act + "\n\n" + error_info);
+ var error_info;
+
+ if ($(".x_modal-body").size()) {
+ error_info = xhr.status + " " + xhr.statusText + " (" + textStatus + ")" + "
" + xhr.responseText + "
";
+ alert("AJAX communication error while requesting " + params.module + "." + params.act + "
" + error_info);
+ } else {
+ error_info = xhr.status + " " + xhr.statusText + " (" + textStatus + ")" + "\n\n" + xhr.responseText;
+ alert("AJAX communication error while requesting " + params.module + "." + params.act + "\n\n" + error_info);
+ }
};
// Send the AJAX request.