manusoftar

ajax attempt 2

Sep 8th, 2013
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function verifyName(name,mbox){
  2.          if (name.length == 0){
  3.              //callback(false);
  4.              return;
  5.          }
  6.          //var ajax = getAJAX();
  7.          //ajax.open("GET","http://www.smon.com.ar/php/query.php?T=0&V="+name);
  8.          //ajax.send();
  9.          
  10.          $.get("http://www.smon.com.ar/php/query.php",{ T : 0, V : name},
  11.                 function(respuesta){
  12.                  console.log("AJAX realizado!");
  13.                  if (respuesta=="1"){
  14.                         //mbox.innerHTML="El nombre de usuario igresado ya está registrado, o bien"+
  15.                     //" dejó el campo vacío";
  16.                     // mbox.style.visibility="visible";
  17.                      alert("AJAX listo!");     
  18.                      console.log("Listo");
  19.                  } else {
  20.                    //mbox.style.visibility="hidden";
  21.                    console.log("Listo!");
  22.                    alert("AJAX listo!");   
  23.                 }
  24.          });
  25. }
Advertisement
Add Comment
Please, Sign In to add comment