1
I tried this way, but I believe it is not the right way. I am actually sure, because the code does not work.
function removeCliente(id)
{
swal({
title: "Are you sure?",
text: "You will not be able to recover this imaginary file!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, delete it!",
cancelButtonText: "No, cancel plx!",
closeOnConfirm: false,
closeOnCancel: false
},
function(isConfirm){
if (isConfirm) {
{function(id)
$.ajax({
type: "POST",
url:'removeClientes.php',
data: {
'idexclusao': id
});
},
swal("Deleted!",
"Your imaginary file has been deleted.", "success");
window.location.href = 'clientes.php';
}
else
{
swal("Cancelled", "Your imaginary file is safe :)", "error");
}
});
}
I don’t know if that’s the problem, but it seems to me
if (isConfirm) { {function(id)
there is a syntax error. Maybe this– Richard Dias
Returned some error in the console?
– Giancarlo Abel Giulian