TOEFL Certificate Records
| # |
NIM |
Name |
Action |
| Search for records... |
')
el.addClass("pop-alert alert alert-danger text-light")
el.hide()
start_loader()
$.ajax({
url:'./action.php?action=delete_record',
method:'POST',
data:{id : id},
dataType:'json',
error:err=>{
console.error(err)
el.text("An error occured while deleting data")
$('#record_list').parent().prepend(el)
el.show('slow')
$('html, body').scrollTop($('#record_list').parent().offset().top - '150')
end_loader()
},
success:function(resp){
if(resp.status == 'success'){
location.reload();
}else if(!!resp.msg){
el.text(resp.msg)
$('#record_list').parent().prepend(el)
el.show('slow')
$('html, body').scrollTop($('#record_list').parent().offset().top - '150')
}else{
el.text("An error occured while deleting data")
$('#record_list').parent().prepend(el)
el.show('slow')
$('html, body').scrollTop($('#record_list').parent().offset().top - '150')
}
end_loader()
console
}
})
}
})
})