i use jQuery Datatables to display some Data. It works perfect but in case the server provides no data, the plugin gives the following warning: "DataTables warning (table id = 'notes'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error."
Why does he not display the empty table message. What do i have to response from the server to display my message like "There are no entrys ..."
Thank you
I found the solution for my problem
The Server-Response have to be an empty object that looks like this:
{"data":[]}
U have to set the property-name (is my case "data") in the Datatables init-code like:
var oTable_Notes = $("#notes").dataTable({
...
"sAjaxDataProp": "data",
...
});
Then, if "data" is empty he shows the "sEmptyTable" - message ...