Change mark-up with a textfield using Ajax In a form I have a field where the user have to enter the name, after this I have to update a markup with data from an external DB using the textfield as a parameter, How can I do this or even Is this posible?

PD: I am using autocomplete to show a list of users when the user is writing in the field.
Thanks.

&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']['#markup'] = _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;


With this code It seems to work, with Devel, the property "#markup" changes, but is not displayed, if I change it to "#title", it is displayed.
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;