1 ajax_example_advanced.inc ajax_example_advanced_commands_html_callback($form, $form_state)

Callback for 'html'.

See also

ajax_command_html()

File

modules/examples/ajax_example/ajax_example_advanced.inc, line 337
AJAX Commands examples.

Code

function ajax_example_advanced_commands_html_callback($form, $form_state) {
  $text = $form_state['values']['html_command_example'];

  $commands = array();
  $commands[] = ajax_command_html('#html_div', $text);
  $commands[] = ajax_command_replace("#html_status", "<div id='html_status'>Updated html_command_example with text=$text;  " . date('r') . "</div>");
  return array('#type' => 'ajax', '#commands' => $commands);
}