How to make form buttons call only javascript?
the form button definition below works for me, the #after_build is useful for loading in javascript that can attach the click handler.

$form['add_button'] = array (
  '#type' =&gt; 'button',
  '#attributes' =&gt; array('onclick' =&gt; 'return (false);'),
  '#value' =&gt; t("Add"),
);

$form['#after_build'] = array('[module_name]_after_build');


Then my javascript that is loaded in a separate file by the after build function, looks something like:

Drupal.behaviors.[module_name] = function(context) {
  $('#edit-add-button').click(function() {
   ...Do something here
  });
};