1

I'm using jQuery DataTables 1.10, the problem I'm having is the table loads the data and such from a service and the JSON is valid but after a few tries running it displays an alert periodically:

DataTables warning: table id=reportsTable - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1

So sometimes it runs perfectly fine then the alert just shows then I refresh and it loads the data. I researched online but to no success. What am I doing wrong?

Below is a screenshot of the error:

Screenshot

2
  • I did go to that url and followed their instructions but no success as i mentioned above. Commented Nov 17, 2015 at 17:32
  • You need to look at the json response in the debugger for a valid request and an invalid request. Then compare the data. Commented Nov 18, 2015 at 9:30

1 Answer 1

1

These kind of errors can come if your JSON response has invalid structure or null. You can use tools like to verify your JSON response. e.g. JSONLint http://jsonlint.com/

Also, to disable error messages, you can change the opensourcedatatable.js script itself. Details: Correctly Suppressing Warnings in DataTables?

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.