datatable fix error–Invalid JSON response
This error is pretty common.
Meaning:
When loading data by Ajax(ajax|option).DataTables by default, expects the data loaded to be valid JSON.
DataTables warning:table id ={id} – Invalid JSON response
It means exactly what is says. DataTables made an Ajax response to the server for JSON data, but the data that
it received back was not valid JSON.
Diagnosis:
First of all, checking what it exactly reply with.Typically, the reponse will consist of an error message from the program
on the server which is being used to create the JSON, which will be the starting poing for resolving the issue fully.
Using firefox web developer tools to get the received JSON.
For my case, the root case is the php code is missing variable defination.
posted on 2017-05-31 18:41 heylinart 阅读(1957) 评论(0) 编辑 收藏 举报