https://datatables.net/release-datatables/examples/server_side/jsonp.html
The above setting works (below) - confirmed on the firebug, the JSON data is retrieved, but my issue is it's not shown on the table!!
Any clues why??
Just to verify things, if source data locally i.e. replace:
"sAjaxSource": "http://localhost:9001/api/gui/messages",
"fnServerData" ...
with something like:
"sAjaxSource": "resources/data.txt",
then all works!
I'm using DataTables 1.9.4
Thanks!
The above setting works (below) - confirmed on the firebug, the JSON data is retrieved, but my issue is it's not shown on the table!!
Any clues why??
$(document).ready(function() { $('#table_id').dataTable( { "bProcessing": true, "bServerSide": true, "sAjaxSource": "http://localhost:9001/api/gui/messages", "fnServerData": function( sUrl, aoData, fnCallback, oSettings ) { oSettings.jqXHR = $.ajax( { "url": sUrl, "data": aoData, "success": fnCallback, "dataType": "jsonp", "cache": false } ); }, "bDeferRender": true, "aoColumns": [ { "mData": "busId", "bSortable": false }, { "mData": "sourceSystem", "bSortable": false }, { "mData": "receiveTime", "bSortable": false }, ... ], "sDom": "rtp", "sPaginationType": "full_numbers", "iDisplayLength": 20 } ); } );
Just to verify things, if source data locally i.e. replace:
"sAjaxSource": "http://localhost:9001/api/gui/messages",
"fnServerData" ...
with something like:
"sAjaxSource": "resources/data.txt",
then all works!
I'm using DataTables 1.9.4
Thanks!