View difference between Paste ID: M65uC9xh and duArXt30
SHOW: | | - or go back to the newest paste.
1
function verifyName(name,mbox){
2
		 if (name.length == 0){
3-
			 callback(false);
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}, function(respuesta){
10+
		 $.get("http://www.smon.com.ar/php/query.php",{ T : 0, V : name}, 
11-
			 										 		 console.log("AJAX realizado!");
11+
		        function(respuesta){
12-
															 if (respuesta=="1"){
12+
				 console.log("AJAX realizado!");
13-
																 //mbox.innerHTML="El nombre de usuario igresado ya está registrado, o bien"+
13+
				 if (respuesta=="1"){
14-
					 				 	    " dejó el campo vacío";
14+
			            //mbox.innerHTML="El nombre de usuario igresado ya está registrado, o bien"+
15-
					 		  mbox.style.visibility="visible";
15+
				    //" dejó el campo vacío";
16-
							  								     alert("AJAX listo!");		
16+
				    // mbox.style.visibility="visible";
17-
												   			     callback(true);
17+
				     alert("AJAX listo!");		
18-
		 													 } else {
18+
				     console.log("Listo");
19-
																 callback(false);
19+
		 		 } else {
20-
																 //mbox.style.visibility="hidden";
20+
				   //mbox.style.visibility="hidden";
21-
																 alert("AJAX listo!");	
21+
				   console.log("Listo!");
22-
		 													 }
22+
				   alert("AJAX listo!");	
23-
		 										      });
23+
		 		}
24
		 });
25
}