Código:
function StateSuggestions() {
this.states="";
new Ajax.Request
(
"procesamiento.php",
{
method:'post',
parameters:'lista=profesores',
onComplete:function(respuesta)
{
var profes=eval('('+respuesta.responseText+')');
this.states = profes;
alert(typeof this.states);// retorna object
alert(typeof profes);// retorna object
}
}
);
alert(typeof this.states);//retorna string aqui quiero q tenga el valor que contiene la variable profes...
}

