How to hook "/system/ajax" with javascript in Drupal 7 When a field accepts multiple values, the admin form adds a button "Add another item". Mousedown submits a POST to /system/ajax to get another field (i'm using multifield here).

I'd like to hook into the javascript completed event to do some custom handling on those additional fields.



How can I most easily hook these ajax calls for javascript callback and reference to the block being added? Is it possible without PHP?
You can use hook_menu_alter and define your own custom callback function like below.

function demo_pane_menu_alter(&amp;$items) {
  $items['system/ajax']['page callback'] = 'demo_pane_taxonomy_autocomplete';
}