1
Works perfectly in Chrome browser, and other browsers don’t...
When I enter the login and password it displays the message "Login Successfully!" and stops the page in Mozilla.
See the code:
echo "<meta http-equiv=\"refresh\" content=\"1;URL=inicio.php\" />";
echo "Login Efetuado com Sucesso!";
$(function() {
caminho = $('.logar');
action = 'ajax/php/logar.php';
enviar = $('form[name="logar"]');
function resposta(datas) {
caminho.html(datas);
}
enviar.submit(function() {
var cadastrar = $.post(action, $(this).serialize());
cadastrar.progress(resposta('<center><i class="icon-spin1 animate-spin"></i>Carregando...</center>'));
cadastrar.done(resposta);
cadastrar.fail(function() {
resposta('Erro ao Cadastrar');
});
return false;
});
});
What am I doing wrong?
I believe you meant Firefox, since Mozilla is only the organization that maintains Firefox. What is the version of Firefox? What is the jQuery version? What is your form like? Does something appear in the browser console? Works in IE?
– Victor Stafusa
@Victor, that’s a question :D
– Jorge B.
Error appears in the javascript/firebug console?
– rray