php and MsSql with a invaild JSON response
php and MsSql with a invaild JSON response
vino6
Posts: 2Questions: 1Answers: 0
Hello,
I use the demo http://stackoverflow.com/questions/27558743/how-to-fetch-data-from-mssql-query-for-datatables-using-ajax
but it always return "table id=example - Invalid JSON response" and cannot load data.
then I use JSONLint to validate the data. It is vaild.
I'm confused.
Here's the debug result: http://debug.datatables.net/abimuc
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
If you load the debug trace you gave above and:
You will be able to see what is being returned by the server. It is not valid JSON - it contains HTML as well. You would need to strip all of the HTML out and return only the JSON data for it to be valid JSON.
Allan
Thanks for your help !