ajax button doesnt fire callback function I need to put some ajax buttons on each row of table. 

My theme looks like this:

/**
 * Implements hook_theme().
 */
function application_wizard_theme($existing, $type, $theme, $path) {
  return array(
    'application_wizard_table' =&gt; array(
      'render element' =&gt; 'element'
    ),
  );
}

function theme_application_wizard_table($vars) {
  extract($vars);
  $header = $element['#header'];
  $header['operations'] = array('data' =&gt; t('Operations'));

  $rows = $element['#rows'];

  foreach ($rows as $key =&gt; $row) {
    foreach ($row as $fieldKey =&gt; $field) {
      $fieldValue = $field[$fieldKey][LANGUAGE_NONE]['0']['value'];
      $rows[$key][$fieldKey] = $fieldValue;
    }

    $operations = array();
    $operations['delete'] = array(
      '#type' =&gt; 'submit',
      '#value' =&gt; t('Delete'),
      '#ajax' =&gt; array(
        'wrapper' =&gt; 'wizard-form-wrapper',
        'callback' =&gt; 'application_wizard_callback'
      ),
    );

    $rows[$key]['operations'] = drupal_render($operations);
  }

  return theme('table', array(
    'header' =&gt; $header, 
    'rows' =&gt; $rows,
    )
  );
}

function application_wizard_callback($form, $form_state) {
  return $form;
}

function application_wizard_submit($form, &amp;$form_state) {
  if ($form_state['triggering_element']['#value'] == t('Delete')) {
    dpm($form_state['triggering_element']);
  }
}


There is no action when I click on generated Delete buttons. In other words, buttons doesn't work.

I have no clue what I am doing wrong so I was hoping someone could tell me thank you in advance.
try adding '#submit':

$operations['delete'] = array(
  '#type' =&gt; 'submit',
  '#value' =&gt; t('Delete'),
  '#ajax' =&gt; array(
    'wrapper' =&gt; 'wizard-form-wrapper',
    'callback' =&gt; 'application_wizard_callback'
  ),
  '#submit' =&gt; array('application_wizard_submit'),
);