Bind click event to ajaxify form button
Ajax callback function must to have an ajax_command_invoke function witch trigger an custom made function in JS side like so:

function form_kalendar_dialog_validate($form, &amp;$form_state) {
  $commands = array();
  $commands[] = ajax_command_invoke(NULL, 'customMethod', array('Custom Method Arg.'));
  return array('#type' =&gt; 'ajax', '#commands' =&gt; $commands);
}


JS

(function ($) {
  $.fn.customMethod = function(arg) {
    // Custom JS goes here.
    console.write(arg);
  };
}) (jQuery);


The answer whas here: Tlattimore blog