How to refresh datatable 1.10.7
How to refresh datatable 1.10.7

I am building a search engine using spring mvc and datatables. On the left side of the table I have a form where I select search date and stop date. Afterwards I click the search button I update the controller using ajax which change the json page where the table gets the data from. Unfortunately, the datatable does not refresh and it is still empty.
Could you please tell me what is wrong with my datatable
Version: 1.10.7
Thanks
table = $('#table').DataTable({
"order": [],
"bProcesing" : true,
"bServerSide" : true,
"iDisplayLength" : 8,
"iDisplayStart": 0,
"sEcho":1,
"sAjaxSource":showrecordings,
"fnServerData": function(showrecordings, aoData, fnCallback)
{
$.ajax({
"dataType" : 'json',
"type" : "POST",
"url" : showrecordings,
"data" : aoData,
"success" : fnCallback
});
},
$('#searchBtn').click(function()
{
var str = $("#searchForm").serialize();
$.ajax({
type: 'POST',
url: showrecordings,
data: str,
dataType: "json",
success: function(){
table.ajax.reload();
}
});
});
This discussion has been closed.