diff --git a/docroot/misc/ajax.js b/docroot/misc/ajax.js index e97a7cf..d76253c 100644 --- a/docroot/misc/ajax.js +++ b/docroot/misc/ajax.js @@ -448,7 +448,12 @@ Drupal.ajax.prototype.getEffect = function (response) { * Handler for the form redirection error. */ Drupal.ajax.prototype.error = function (response, uri) { - alert(Drupal.ajaxError(response, uri)); + if(response.status) { + alert(Drupal.ajaxError(response, uri)); + } + else if (window.console) { + console.log(Drupal.ajaxError(response, uri)); + } // Remove the progress element. if (this.progress.element) { $(this.progress.element).remove(); diff --git a/docroot/misc/autocomplete.js b/docroot/misc/autocomplete.js index 5679081..d79fabc 100644 --- a/docroot/misc/autocomplete.js +++ b/docroot/misc/autocomplete.js @@ -307,7 +307,12 @@ Drupal.ACDB.prototype.search = function (searchString) { } }, error: function (xmlhttp) { - alert(Drupal.ajaxError(xmlhttp, db.uri)); + if (xmlhttp.status) { + alert(Drupal.ajaxError(xmlhttp, db.uri)); + } + else if (window.console) { + console.log(Drupal.ajaxError(xmlhttp, db.uri)); + } } }); }, this.delay);