Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Drupal 7 views.module allows to refresh ajaxified views
- dynamically via a javascript call.
- jQuery('.view-id-XXX').trigger('RefreshView');
- // Implementation in PHP
- $commands[] = ajax_command_invoke('.view-id-XXX', 'trigger', array('RefreshView'));
- return array(
- '#type' => 'ajax',
- '#commands' => $commands,
- );
- // OR
- $commands[] = ajax_command_invoke('.view-id-XXX', 'trigger', array('RefreshView'));
- ajax_deliver(array(
- '#type' => 'ajax',
- '#commands' => $commands,
- ));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement