I tried that, but I do not think it's the right way. I'm 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");
}
});
}