Server-Side Processing does not redraw the table

Server-Side Processing does not redraw the table

sandeep1461sandeep1461 Posts: 1Questions: 3Answers: 0

$(document).ready(function() {
var tableExample = jQuery('#client_table').DataTable(
{ "bJQueryUI": true,
"sPaginationType": "full_numbers",
"bProcessing": true,
"bServerSide": true,
"bSearchable": true,
"bFilter": true,
"bVisible":true,
"iDisplayLength": 100,
"type":"POST",
"sAjaxSource": my_custom_url.ajax_url+'?action=fn_my_ajaxified_dataloader_ajax',
"fnServerData": function( sUrl, aoData, fnCallback )
{
aoData.push( { "name": "min", "value": $('#min').val() } );
aoData.push( { "name": "max", "value": $('#max').val() } );
jQuery.ajax( {
"url": sUrl,
"data": aoData,
"success": fnCallback,
"dataType": "json",
"cache": false
} );
},
"sAjaxDataProp": "aaData",
"aaSorting": [[ 0, "desc" ]],
"aoColumnDefs": [
{ "bSearchable": false, "aTargets": [ 10,13 ] },
{ 'bSortable' : false, 'aTargets' : [ 13 ] }
],
"createdRow": function( row, data, dataIndex )
{
$(row).attr('id', data[14]);
},

        } ) ;

    jQuery('#min','#max').on( 'keyup click change', function () { tableExample.fnFilter( jQuery(this).val(), 0 );} );

  jQuery('#filter').on("click",function(){window.location.reload();});

   // oSettings = tableExample.fnSettings();

    // Apply the search
    jQuery('#client_table tfoot th').each( function (){
    var title = jQuery(this).text();
    jQuery(this).html( '<input type="text" placeholder=" " style="height:40px; width:100%; background-color:none!important" />');

} );

tableExample.columns().every(function(){
    var that = this;
    jQuery( 'input', this.footer() ).on( 'keyup change', function (){
        if ( that.search() !== this.value ){
            that
                .search( this.value )
                .draw();
        }
    });
});

});

and server response is

{"sEcho": 1, "iTotalRecords": 80, "iTotalDisplayRecords": 74, "aaData": [ ["2016-03-14 23:39:42","0"
,"sandeep14","12312312313","2147483647","sandeep14@gmail.com","810","","","等待審批","<a href='admin.php

<?php page=add_client&edit=91'>编辑 尚欠資料 删除 批核戶口","","","查看","91"],["2016-02-16 12:43 :30","0","asas9sandeep Kumar","12457898652","2147483647","sandewewqeep@ucodice.com","810","","","等待審 批","编辑 尚欠資料 删除 批核戶口","",""," 查看","87"],["2016-02-16 12:42:28","0","asas9sandeep Kumar5878778","12457898652","2147483647","sandewewqeep ucodice.com","810","","","等待審批","编辑 尚欠資料 删除 批核戶口","","","查看","86"],["2016-02-16 12:40:34","0","asas9sandeep Kumar5","12457898652","2147483647","sandewewqeep ucodice.com","810","","","等待審批","编辑 尚欠資料 删除 批核戶口","","","查看","85"],["2016-02-16 12:35:33","0","9sandeep Kumar5","12457898652","2147483647","sandewewqeep ucodice.com","810","","","等待審批","编辑 尚欠資料 删除 批核戶口","","","查看","84"],["2016-02-16 12:31:18","0","sandeep Kumar5","12457898652","2147483647","sandewewqeep ucodice.com","810","","","等待審批","编辑 尚欠資料 删除 批核戶口","","","查看","83"],["2016-02-16 12:28:10","0","sandeep Kumar584","12457898652","2147483647","sandewewqeep ucodice.com","810","","","等待審批","编辑 尚欠資料 删除 批核戶口","","","查看","82"],["2016-02-16 12:26:20","0","sandeep Kumar58","12457898652","2147483647","sandewewqeep ucodice.com","810","","","等待審批","编辑 尚欠資料 删除 批核戶口","","","查看","81"],["2016-02-16 12:25:00","0","sandeep Kumar146","12457898652","2147483647","sandewewqeep ucodice.com","810","","","等待審批","编辑 尚欠資料 删除 批核戶口","","","查看","80"],["2016-02-16 12:19:35","0","sandeep Kumar146","12457898652","2147483647","sandewewqeep ucodice.com","810","","","等待審批","编辑 尚欠資料 删除 批核戶口","","","查看","79"]] } ?>

but it is not draw table.

This discussion has been closed.