Drupal 7: use Form API to make a button that doesn't submit the whole page
Just try to use "submit" as the type and specify a custom "#submit". From the ajax_example module:

$form['add_name'] = array(
  '#type' =&gt; 'submit',
  '#value' =&gt; t('Add one more'),
  '#submit' =&gt; array('ajax_example_add_more_add_one'),
  '#ajax' =&gt; array(
    'callback' =&gt; 'ajax_example_add_more_callback',
    'wrapper' =&gt; 'names-fieldset-wrapper',
  ),
);


This does not submit the form with the default submit handler but with your own. In this case it is "ajax_example_add_more_add_one".

Hope it helps, j