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

Callback for 'prepend'.

See also

ajax_command_prepend()

File

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

Code

function ajax_example_advanced_commands_prepend_callback($form, $form_state) {
  $commands = array();
  $commands[] = ajax_command_prepend('#prepend_div', "Prepended Stuff...");
  $commands[] = ajax_command_replace("#prepend_status", "<div id='prepend_status'>Updated prepend_command_example " . date('r') . "</div>");
  return array('#type' => 'ajax', '#commands' => $commands);
}