I have this code:
function delTempBill() {
if ($('#bills_ID').val() == '') {
popUpMessage("Error", "choose bills to delete", 2);
} else {
$.ajax({
url: "DelTempBill.php",
type: "POST",
data: {
draft: "ok",
bills_ID: selectedTempId
},
dataType: "json",
success: function (data2) {
if (parseInt(data2) > 0) {
$("#tempBills" + selectedTempId).remove();
popUpMessage("Done", "Bills was Delete", 2);
newGrid();
}
}
});
}
}
This code is to delete bills from table, when I call this function the bill was deleted but the message cannot show.
Why ?