Ajax does not work on the server

0

I have read some answers in the forum, but none have solved my problem, Ajax works on the site, but when upload does not work, follow the code:

jQuery('#formLogin').submit(function(){
    var dados = jQuery( this ).serialize();

    jQuery.ajax({
        type: "POST",
        url: "script/logar.php",
        data: dados,
        success: function( data ) {
            var y = data.length;

            if (y == 9) { 
                window.location.href = "editar-perfil.php";
            }
            return false;
        }
    }
});
    
asked by anonymous 13.02.2018 / 18:54

0 answers