Hi Guys,
include_once 'modules/node/node.pages.inc';
$form_state = array('storage' => NULL, 'submitted' => FALSE);
$form_build_id = $_POST['form_build_id'];
// Get the form from the cache.
$form = form_get_cache($form_build_id, $form_state);
$args = $form['#parameters'];
$form_id = array_shift($args);
// We will run some of the submit handlers so we need to disable redirecting.
$form['#redirect'] = FALSE;
// We need to process the form, prepare for that by setting a few internals
// variables.
$form['#post'] = $_POST;
$form['#programmed'] = FALSE;
$form_state['post'] = $_POST;
// This call recreates the form relying solely on the form_state that the
// drupal_process_form set up.
$form = drupal_rebuild_form($form_id, $form_state, $args, $form_build_id);
watchdog('innoraft', 'Form Values: ' . serialize($form_state['values']));
// Render the new output.
unset($form['essay-box']['#prefix'], $form['essay-box']['#suffix']);
$form['essay-box']['#value'] = 'Saved';
$output = drupal_render($form['essay-box']);
drupal_json(array('status' => TRUE, 'data' => $output));
exit();
watchdog('innoraft', 'Form Values: ' . serialize($form_state['values']));