fnServerData caused DataTables not rendered
fnServerData caused DataTables not rendered
Hello.
I want to make DataTables using ajax, so here my js code :
[code] $(document).ready(function() {
oTable = $('#transaksiAJAX').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bFilter": false,
"bSort": false,
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "<?=base_url()?>member/get_result"
"fnServerData": function(sSource, aoData, fnCallback) {
oTable.push({ "name": "range1", "value": $( "#range1" ).val() },
{ "name": "range2", "value": $( "#range2" ).val() },
{ "name": "nomer", "value": $( "#nomer" ).val() } );
$.ajax(
{
'dataType': 'json',
'type' : 'POST',
'url' : sSource,
'data' : aoData,
'success' : fnCallback
});
}
});
} );[/code]
but the js just make the table not showed properly, it just show the header of the table.
thanks
I want to make DataTables using ajax, so here my js code :
[code] $(document).ready(function() {
oTable = $('#transaksiAJAX').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bFilter": false,
"bSort": false,
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "<?=base_url()?>member/get_result"
"fnServerData": function(sSource, aoData, fnCallback) {
oTable.push({ "name": "range1", "value": $( "#range1" ).val() },
{ "name": "range2", "value": $( "#range2" ).val() },
{ "name": "nomer", "value": $( "#nomer" ).val() } );
$.ajax(
{
'dataType': 'json',
'type' : 'POST',
'url' : sSource,
'data' : aoData,
'success' : fnCallback
});
}
});
} );[/code]
but the js just make the table not showed properly, it just show the header of the table.
thanks
This discussion has been closed.