diff --git a/common/js/xml_handler.js b/common/js/xml_handler.js index 2b049bdfe..5d0d9a940 100644 --- a/common/js/xml_handler.js +++ b/common/js/xml_handler.js @@ -134,8 +134,13 @@ // Hide the waiting message and display an error notice. 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); + if ($(".x_modal-body").size()) { + var 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; + alert("AJAX communication error while requesting " + params.module + "." + params.act + "\n\n" + error_info); + } }; // Send the AJAX request.