I am loading data rows using ajax, now i am trying to delete row by clicking delete image icon in that row( delete image is <input type='image'
loading with row data).
now by clicking on delete row icon it is firing but ajax not running to delete data in MySql Db.
$(document).ready(function(){
$(document.body).on('click', '.deleterow', function(){
var userid = $(this).val();
var examid = $("#examid").val();
//alert(userid);
$.ajax({
type:"POST",
url:"deletecandidateexam.php",
data:"candid="+userid+"examid="+examid,
dataType:"json",
success: function(data){
if(data = "norecord"){
alert("No Recodrs Found to Delete Selected Candisate..");
}if(data = "success"){
$(this).parent().parent().remove();
}if(data = "failure"){
alert("Failed to Delete Selected Candisate, Please Try Later..");
}
}
});
});
});