Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. $commands[] = ajax_command_invoke(
  2. NULL,
  3. 'mymodule_command',
  4. array($data)
  5. );
  6.  
  7. $.fn.mymodule_command = function(data) {
  8. // dialog ajax id
  9. var dialogAjaxId = data.id;
  10. var blah = JSON.stringify(data.values);
  11.  
  12. $commands[] = array(
  13. 'command' => 'mymodule_command',
  14. 'arguments' => array(...),
  15. );
  16.  
  17. Drupal.ajax.prototype.commands.mymodule_command = function(ajax, response, status) {
  18. console.log('mymodule_command', ajax, response, status);
  19. console.log('arguments', response.arguments);
  20. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement