1 ajax_example_advanced.inc | ajax_example_advanced_commands_before_callback($form, $form_state) |
Callback for 'before'.
See also
File
- modules/
examples/ ajax_example/ ajax_example_advanced.inc, line 272 - AJAX Commands examples.
Code
function ajax_example_advanced_commands_before_callback($form, $form_state) {
$selector = '#before_div';
$commands = array();
$commands[] = ajax_command_before($selector, "New 'before'...");
$commands[] = ajax_command_replace("#before_status", "<div id='before_status'>Updated before_command_example " . date('r') . "</div>");
return array('#type' => 'ajax', '#commands' => $commands);
}