I have the code below that is taking me seriously.
No people are possible!
// JavaScript Document// JavaScript Document
$(document).ready(function(e) {
$("a.excluiFalecimento").click(function() {
if (confirm('Deseja Excluir esta Nota?') ) {
$.post ("../_requeridos/excluiFalecimento.php", {
idFalecimento : $(this).attr('falecimentoid')
}, function(retorno){
alert(retorno)
if (retorno == "OK") {
alert('Excluido com sucesso');
location.reload();
} else {
alert("Erro na exclusão");
}
}
);
return false;
}
})
});
I have 4 exactly same files with the exception of only the variable names.
I have a alert
that is printing OK here
alert(retorno)
if (retorno == "OK") {
But do not enter the correct block.
And of course it does not reload .
Where am I going wrong?
Detail, deletion is normally done.