Ver Mensaje Individual
  #6 (permalink)  
Antiguo 27/04/2012, 12:22
Avatar de Dafonz
Dafonz
 
Fecha de Ingreso: octubre-2009
Mensajes: 127
Antigüedad: 14 años, 7 meses
Puntos: 36
Respuesta: Problema con jQuery

async: false
Cita:
The first letter in Ajax stands for "asynchronous," meaning that the operation occurs in parallel and the order of completion is not guaranteed. The async option to $.ajax() defaults to true, indicating that code execution can continue after the request is made. Setting this option to false (and thus making the call no longer asynchronous) is strongly discouraged, as it can cause the browser to become unresponsive.
Por eso te devuelve undefined (aunque arriba si le habia puesto async false, por eso si me funciono), ve que es lo que mas te conviene, mas que todo por la advertencia que mencionan. Pero en este caso necesitas la respuesta para que el código siga por eso lo puse.

Última edición por Dafonz; 27/04/2012 a las 12:28