Ver Mensaje Individual
  #3 (permalink)  
Antiguo 22/11/2008, 12:03
SoutlinK
 
Fecha de Ingreso: junio-2007
Mensajes: 189
Antigüedad: 16 años, 10 meses
Puntos: 3
Respuesta: [jQuery] Ajax - Sacar valor fuera de una funcion

Osea que tendría que hacer esto verdad?

Código PHP:
function get_nextid()
{
     $.
ajax({
       
type"POST",
       
url"ajax/socios.php",
       
data"function=add",
       
success: function(data){
         var 
num_socio data;
         
agregar_socio(num_socio);
       }
     });
}

function 
agregar_socio(num_socio)
{
//continuo aquí con la funcion.

NO habrria forma de parar el script, hasta que el ajax reciba señal?