2
Opa, I need to execute an ajax when closing the tab, is that possible? I tried to:
        window.onbeforeunload = ConfirmExit;
        function ConfirmExit()
        {
            $.ajax({
                url:'salvar.php',
                data:{usuario:1, ajaxget:true},
                method:'post',
                success:function(data)
                {
                }
            });
            return "Mensagem de fechamento de janela....";
        }
It does not work, if I remove the ajax, the message is displayed normally