Ver Mensaje Individual
  #1 (permalink)  
Antiguo 31/12/2011, 20:59
andystefano
 
Fecha de Ingreso: febrero-2006
Mensajes: 16
Antigüedad: 18 años, 3 meses
Puntos: 1
Exclamación No me retorna valor la funcion

esta funcion me retorna valor de status = null; osea no me redeclara la variable dentro del if... Espero una manita gracias...


Código Javascript:
Ver original
  1. function validarNickUsuario(){
  2.  
  3. var status = null;
  4.  
  5. $.getJSON("/ajax/usuario/existeNick/?nic_usu=" + $("#nic_usu").get(0).value, function(data){
  6.                      if(data.existe=="true"){
  7.                      status = false;
  8.                     }else{
  9.                      status = true;
  10.                     }
  11.              });
  12.  
  13. return status;
  14.  
  15. }



el json funciona bien tieen los valores del tipos:

Código json:
Ver original
  1. {"existe" : "false"}