Ver Mensaje Individual
  #9 (permalink)  
Antiguo 31/05/2017, 15:38
Avatar de xfxstudios
xfxstudios
 
Fecha de Ingreso: junio-2015
Ubicación: Valencia - Venezuela
Mensajes: 2.448
Antigüedad: 8 años, 10 meses
Puntos: 263
Respuesta: Problemas con $.post()

Prueba usando una variable de control:
Código Javascript:
Ver original
  1. function formhashregistro(form, email) {
  2.  
  3.         var control;//iniciamos una variable de control general
  4.  
  5.         if (!regex.test(email.value)) {
  6.         // código...
  7.         }else{
  8.             var textoBusqueda = $("input#email").val();
  9.             $.post("multiUSERS_registro1_buscarINPUT2.php", {
  10.                     valorBusqueda: textoBusqueda
  11.                 },function(mensaje)
  12.                 {
  13.                     if (mensaje == "Si") {
  14.  
  15.                         control = true;//pasamos a true la variable
  16.                         $("#email").html('E-mail: <span class="rojo f08">El correo <strong>'+textoBusqueda+'</strong> ya está registrado, pruebe con otro.</span>');
  17.                     }else{
  18.  
  19.                         control = false;//pasamos a false
  20.                         $("#email").html("Email: <span class='verde f08'>El correo <strong>"+textoBusqueda+"</strong> no está registrado, puede continuar23.</span>"); 
  21.                     };
  22.                 });
  23.                 //si es verdadera detengo el codigo
  24.  
  25.                 if (control){
  26.                     control = "";//limpiamos la variable para reutilizarla mas adelante
  27.                     return false;
  28.                 };
  29.         };
  30.         // continua...
  31.         if (datepicker.value == '') {
  32.         // más código...
  33.         }
  34. }
__________________
[email protected]
HITCEL