// 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);
// 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);
}
});
} // 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);
}
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
// 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, '<div class="ajax_error_message">saveChanges() called with no changed elements.</div>');
// 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);