Ajax Call on image button
function clicktell_form_alter(&amp;$form, &amp;$form_state, $form_id) {

    if($form_id=='user_profile_form') {

       $form['linkb'] = array(
            '#type' =&gt; 'image_button',
            '#href' =&gt; '',
            '#title' =&gt; t('something'),

            '#name' =&gt; 'linkb',
            '#ajax' =&gt; array(
                'method' =&gt; 'html', // this is important without this if else condition for ajax will not work.
                'effect' =&gt; 'fade',
                 'prevent' =&gt; 'mousedown',
                'callback' =&gt; 'clicktell_verification',
                'wrapper' =&gt; 'replace_textfield_div',),
        );
        $form['cardnresp'] = array(
            '#type' =&gt; 'hidden',
            //'#default_value' =&gt; '',
            '#title' =&gt; t('This is where msg comes'),
            '#prefix' =&gt; '&lt;div id="replace_textfield_div"&gt;',
            '#suffix' =&gt; '&lt;/div&gt;',
        );
        $form['#validate'][]='clicktell_error';  


    }
    return $form;
}


This will run ajax but you may feel form is submitting but there is no actual submitting of form