function ajax_example_advanced_commands_after_callback in Examples for Developers 7
Callback for 'after'.
See also
1 string reference to 'ajax_example_advanced_commands_after_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 232 - AJAX Commands examples.
Code
function ajax_example_advanced_commands_after_callback($form, $form_state) {
$selector = '#after_div';
$commands = array();
$commands[] = ajax_command_after($selector, "New 'after'...");
$commands[] = ajax_command_replace("#after_status", "<div id='after_status'>Updated after_command_example " . date('r') . "</div>");
return array(
'#type' => 'ajax',
'#commands' => $commands,
);
}