How to invoke bootbox.js after burning data in BD

0

How can I display a message box using bootbox.js after writing to the database by redirecting the user?

I ran a test with the following script, but I did not succeed.

if($execCurso){ ?>
    <script>        
        $(document).on("load", ".alert", function(e) {
            bootbox.alert("Obrigado por se candidatar-se a essa vaga. Atualize seu currículo se achar necessário.", function() {
                var novaURL = "http://meuendereco/curriculo/Form.php";
                $(window.document.location).attr('href',novaURL);                           
            });
        });         
    </script>

<?php   
}else{
    echo "Erro cadastrando";
    header("Location:home.php?m=0");
}

I made some inquiries by Google but could not find the solution to the problem I have.

    
asked by anonymous 08.04.2014 / 14:10

1 answer

2

Instead of: $(window.document.location).attr('href',novaURL); tries location.href=novaURL . It always worked for me.

    
08.04.2014 / 15:08