I have a server-side paging enabled data table that works fine. Following is my table initialized, which pulls json data & renders:
function initTestTable(){
myTable = $('#testTable').dataTable({
"processing": true,
"serverSide": true,
"ajax": {
"url": "testTableData.html",
"type": "GET",
},
"columnDefs": [ {
"targets": 0,
"data": "code",
"render": function ( data, type, full ) {
return '<a href="'+data+'">'+data+'</a>';
}
},
{
"targets": 1,
"data": "description",
"render": function ( data, type, row, meta ) {
return data;
}
}]
});
}
Even ajax following ajax reload working fine:
myTable.api().ajax.reload(); //reloads ajax with very previous ajaxed URL
The problem is when I want to relaod with different URL using following load() function. Actually it is freezing the on "Processing..." message without rendering the data on table. Response seems to alright.
myTable.api().ajax.url('getNextData.html').load(); //reloads ajax with specified URL
I dont know what is going wrong as there are errors are shown in the developer tool console. Please suggest.