Change mark-up with a textfield using Ajax
I could make what I was trying to do:

&lt;?php 
/*this part is in hook_form_alter*/
$form['submitted']['empleado']['#ajax'] = array(
'callback' =&gt; 'ajax_saldo_markup_callback',
'wrapper' =&gt; 'saldo-markup-reload',
);
$form['submitted']['saldo']['#prefix'] = '&lt;div id="saldo-markup-reload"&gt;';
$form['submitted']['saldo']['#suffix'] = '&lt;/div&gt;';
$form['submitted']['saldo']['#value'] = _busqueda_saldo_vacas($form, $form_state);
/*this part is in hook_form_alter*/

function ajax_saldo_markup_callback($form, $form_state) {
    return $form['submitted']['saldo'];
}

function _busqueda_saldo_vacas(&amp;$form, $form_state){
$username = $form_state['values']['submitted']['empleado'];
/*DB Query's*/

    foreach ($result as $row) { //At the end I get only one data
    $form['submitted']['saldo']['#markup'] = $row-&gt;Data;
    }
}
?&gt;