EDIT2: I edit this and open it again, the problem continues. Now I've added code and doesn't read it at all, I hit F12 and JS file is not updated :/ I don't know what to do...
EDIT: I closed the projects (in the browser tabs) and re-opened them, and somehow the commented lines were not read anymore. It just fixed itself.
I'm working on the login part of a web application project, and I'm trying out different parts of code.. because it's not working :/
But... I can't do much right now, I've commented the lines that were causing trouble, but when loaded, it keeps giving an error in console reading those lines! :/ Any ideas on what could I do to fix this?
(Below --> Previous problem) Here is the code from the ajax code that's giving trouble:
function login(){
if(validacionLogin()){
/*$.ajax({
url: "",
type: "POST",
data: {"usuarioInfo": usuarioInfo,
"passwordInfo": passwordInfo,
},
dataType: "html",
beforeSend: function() {
console.log("Procesando...");
},
success: function(data) {
if( data == "OK"){
//alert("Existe usuario");
//location.href = "";
return;
}
if( data == "ERROR"){
//alert("No existe usuario");
// alert("Hubo un error, por favor intente nuevamente");
return;
}
alert("Mensaje del servidor: " + data);
}
});*/
alert("WIIII");
console.log("Usuario: "+usuarioInfo);
console.log("Password: "+passwordInfo);
}else{
alert("Campos incorrectos");
console.log("Usuario: "+usuarioInfo);
console.log("Password: "+passwordInfo);
}
}
It's called by a button in a form. It used to work with the alerts and stuff... but when I tried to add the ajax part, it kept giving errors, even AFTER commenting that part, or even deleting it :/
I don't think like starting the project all over again if this keeps happening in the future, there must be some other way :/
Thanks in advance!