PHP and Javascript - Yes and No options in Confirm popup

1

On my site, I have an event query section. Within this section, I added a CANCEL EVENT button. When this button is clicked, it performs the following function in javascript:

function cancelaEvento(val){
    var valor = val;
    if (confirm("Tem certeza que deseja cancelar o evento "+val+"?\nCaso deseje fazer alguma alteração, clique em Editar") == true) {
        location.href = "http://meusite.com.br/consultaeventos/cancelar?valor="+valor;
    }
}
                    
asked by anonymous 31.10.2016 / 14:34

0 answers