I have this ajax code to remove a record form database:
function f(id) {
$.ajax({
url: "/meeting/delParticipant/"+id+"/",
type: "POST",
success: function(res){
alert ('success');
$('#participants tr:last').prev().remove();
}
});
};
and I have a table in template that each row has an anchor to call this:
field1 field2 field3 <a href="#" onClick="f(1)" >del</a>
field1 field2 field3 <a href="#" onClick="f(2)" >del</a>
field1 field2 field3 <a href="#" onClick="f(3)" >del</a>
...
It remove the record successfully but success function wont fire and I don’t know why!
Try this code it would fire ajax success