X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=js%2Fajax-common.js;h=113864a9ee58b7b626fcba27c4034058b76bd9d6;hb=596c8ab32594401ca84abfbfe35513ddfff31bec;hp=01c56a9febc6df85b6fdd0c099e5828c71a046af;hpb=63f159414369b5ea19a8ca75d8cd8033c45d8341;p=mailer.git diff --git a/js/ajax-common.js b/js/ajax-common.js index 01c56a9feb..113864a9ee 100644 --- a/js/ajax-common.js +++ b/js/ajax-common.js @@ -193,16 +193,16 @@ function sendAjaxRequest (level, doValue, extra, isJson) { // Called on success success: function (ajax_content) { // Is ajax_content set? - if (ajax_content.responseText == undefined) { + if (ajax_content.reply_content == undefined) { // This shall not happen - throw new 'ajax_content.responseText not returned from ajax.php, please fix your scripts.'; - } else if (ajax_content.responseText == null) { + throw new 'ajax_content.reply_content not returned from ajax.php, please fix your scripts.'; + } else if (ajax_content.reply_content == null) { // This shall not happen, too - throw new 'ajax_content.responseText=null from ajax.php, please fix your scripts.'; + throw new 'ajax_content.reply_content=null from ajax.php, please fix your scripts.'; } // Set AJAX reply - setAjaxReply(ajax_content.responseText, isJson); + setAjaxReply(ajax_content.reply_content, isJson); // Mark it as success setAjaxSuccess(true); @@ -211,16 +211,16 @@ function sendAjaxRequest (level, doValue, extra, isJson) { // Called in case of an error (e.g. HTTP response status not '200 OK') error: function (ajax_content) { // Is ajax_content set? - if (ajax_content.responseText == undefined) { + if (ajax_content.reply_content == undefined) { // This shall not happen - throw new 'ajax_content.responseText not returned from ajax.php, please fix your scripts.'; - } else if (ajax_content.responseText == null) { + throw new 'ajax_content.reply_content not returned from ajax.php, please fix your scripts.'; + } else if (ajax_content.reply_content == null) { // This shall not happen, too - throw new 'ajax_content.responseText=null from ajax.php, please fix your scripts.'; + throw new 'ajax_content.reply_content=null from ajax.php, please fix your scripts.'; } // Set AJAX reply - setAjaxReply(ajax_content.responseText, isJson); + setAjaxReply(ajax_content.reply_content, isJson); } }); @@ -379,8 +379,8 @@ function displayErrorWindow (prefix, ajax_content) { } // END - if // Copy the response text to the error variable - if (ajax_content.responseText != undefined) { - $('#' + prefix + '_error_content').html(ajax_content.responseText); + if (ajax_content.reply_content != undefined) { + $('#' + prefix + '_error_content').html(ajax_content.reply_content); } else { $('#' + prefix + '_error_content').html(ajax_content); } @@ -491,7 +491,7 @@ function doFooterPage (prefix, htmlId, button) { return; } // END - if - // Do we have a 'next' entry? + // Is there a 'next' entry? //* DEBUG: */ alert('doFooterPage(): button=' + button + ',currentTabId=' + currentTabId + ',nextPage[currentTabId]=' + nextPage[currentTabId]); if ((button == 'next') && (nextPage[currentTabId] != null)) { // Then call the AJAX requester @@ -592,7 +592,7 @@ function saveChanges (prefix) { // Mark all elements as unchanged markAllElementsAsUnchanged(); - // Do we have changed elements + // Is there changed elements if (changedElements.length == 0) { // This should not happen displayErrorWindow(prefix, '
saveChanges() called with no changed elements.
'); @@ -624,7 +624,7 @@ function saveChanges (prefix) { // Reset form resetMailerAjaxForm(); } else { - // Do we have 'failed_fields' set? + // Is there 'failed_fields' set? if ((ajax_content.failed_fields != undefined) && (ajax_content.message != undefined)) { // Mark all fields as 'failed' markFormFieldsFailed(ajax_content.failed_fields);