如何在服务器端更改后刷新 DataTable
这里我在服务器端的isData= 1
mqsql(DB)
function one()
{
var DataTableApp = $('#DataTableApp').dataTable({
"sAjaxSource": "php/getAppDetails.php",
....
....
}
点击 DataTable 中的某个。我已经改变了isData=0
,它是在ajax调用另一个函数。
更改isData=0
后,我想引用该表..
如何引用 DataTable
$.ajax({
type: "GET",
url: "php/removeApp.php",
data: data,
dataType: "json",
success: function (data) {
json_objApp = data;
if(json_objApp.isSuccessful == true)
{
document.getElementById('removeAppSucc').innerHTML = "Successfully Removed";
document.getElementById('collapseFive').setAttribute("class", "collapse");
DataTableApp.fnDraw();
DataTableApp._fnAjaxUpdate();
}
else
{
document.getElementById('removeAppSucc').innerHTML = "App is not removed"
}
},
});