You are here

function ajax_example_advanced_commands_append_callback in Examples for Developers 7

Callback for 'append'.

See also

ajax_command_append()

1 string reference to 'ajax_example_advanced_commands_append_callback'
ajax_example_advanced_commands in ajax_example/ajax_example_advanced.inc
Form to display the AJAX Commands.

File

ajax_example/ajax_example_advanced.inc, line 257
AJAX Commands examples.

Code

function ajax_example_advanced_commands_append_callback($form, $form_state) {
  $selector = '#append_div';
  $commands = array();
  $commands[] = ajax_command_append($selector, "Stuff...");
  $commands[] = ajax_command_replace("#append_status", "<div id='append_status'>Updated append_command_example " . date('r') . "</div>");
  return array(
    '#type' => 'ajax',
    '#commands' => $commands,
  );
}