如何刷新DataTable

时间:2014-04-11 04:46:28

标签: javascript jquery datatables

如何在服务器端更改后刷新 DataTable

这里我在服务器端的isData= 1 mqsql(DB)

时定义了dataTable
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"
            }
        },
});

0 个答案:

没有答案