1
To in the following situation, my login form is working perfectly in desktop version, I went to test on android and Ios it does not work and not even an error on the console... just waiting for the answer of the api.. follow my javascript file
$(function() {
$("#login-form").validate({
rules : {
email : {
required : true,
email : true
},
password : {
required : true,
minlength : 0,
maxlength : 20
}
},
messages : {
email : {
required : 'E-mail do game',
email : 'E-mail do gmae não e valido'
},
password : {
required : 'Senha do game'
}
},
submitHandler: submitForm
});
function submitForm()
{
var data = $("#login-form").serialize();
$.ajax({
type : 'POST',
url : 'http://localhost/api.game/api/auth',
data : data,
beforeSend: function()
{
$("#error").fadeOut();
$("#btn-login").html('<span class="glyphicon glyphicon-transfer"></span> Aguarde logando.');
},
success : function(response) {
if(response.status === true){
$("#btn-login").html('<img src="../img/rolling.gif" /> Logado você vai ser redirecionado');
setTimeout(function(){location.href=response.redirect} , 2000);
}
else{
$("#error").fadeIn(100, function(){
$("#error").html('<div class="alert alert-danger"> <span class="glyphicon glyphicon-info-sign"></span> '+response.msg+' !</div>');
$("#btn-login").html('<span class="glyphicon glyphicon-log-in"></span> Entrar');
});
}
}
});
return false;
}
});
someone there has already gone through this problem ??? is not returning nor an error on the console.
I need to see your HTML.
– Klaider
Hello, do not return an error in the console does not mean that everything is correct, you are sending information and receiving via ajax, however it generates response, if you need to check what is received in the api and what is being sent as a return to ajax, see item by item very detailed.
– Wilson Rosa Gomes