How to call Drupal AJAX programmatically Code example of how to call Drupal AJAX programmatically, run all commands, and apply behaviors.