From This page I found the answer
In the template.php
add the following code, replace epic_ajax
with your theme name
// Disable the ajax redirect.
function epic_ajax_asaf_form_ajax_commands_alter(&$commands, $form, &$form_state, $form_id) {
foreach($commands as $key => $command) {
if ($form['#node']->nid) {
if ($command['command'] == 'asafRedirect' || 'asafRefresh') {
unset($commands[$key]);
break;
}
}
}
}
// These functions allow for subsequent saves without validation errors.
function epic_ajax_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'plan_node_form') {
// Ensure our own validation is called first to overcome the node changed error node.module: 971
array_unshift($form['#validate'], "epic_ajax_node_edit_validate");
}
}
function epic_ajax_node_edit_validate($form,&$form_state){
// Update changed value to avoid node changed error node.module: 971
$form_state['values']['changed'] = $form_state['node']->changed;
}
you need to add this javascript code as well
(function ($, Drupal) {
Drupal.behaviors.epicAjax = {
attach: function(context, settings) {
$('input, select').change(function() {
$('#edit-actions .form-submit').first().trigger('mousedown');
});
}
};
})(jQuery, Drupal);