how to call handler on every ajax request I have created a handler for every submit request using $form['#submit'][] = 'MYMODULE_form_submit_handler' now the problem is this doesnt works on Ajax submit, or page call backs functions. i want to log everything that is happening on every insert,update/delete in admin area
$form['button'] = array(
    '#type' =&gt; 'button',
    '#value' =&gt; t('Save'),
    '#attributes' =&gt; array(
        'onclick' =&gt; 'return false;',
        'class' =&gt; array('form-submit', 'rights-form-submit')
    ),
);

Where 'rights-form-submit' is a class that directs this button to AJAX call from javascript. i want to call hook on success / failure of request
Setting a form element to type button prevents submit handlers from being executed. You'll need to change the type to submit if you want your submit handlers to be called.