Example - Server Side - Not Working
Example - Server Side - Not Working
justforlooking
Posts: 2Questions: 0Answers: 0
Hey all-
Can anyone give me a hand trying to figure out why the example documentation server_side.html isn't working. I've changed the server_side.html and the server_processing.php files to match my database schema... but I'm getting a json parsing error. "DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error."
http://debug.datatables.net/uviwov
Thank you in advance for looking at this!
Can anyone give me a hand trying to figure out why the example documentation server_side.html isn't working. I've changed the server_side.html and the server_processing.php files to match my database schema... but I'm getting a json parsing error. "DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error."
http://debug.datatables.net/uviwov
Thank you in advance for looking at this!
This discussion has been closed.
Replies
[code]
ArrayArrayArrayArrayArrayArrayArrayArrayArrayArray {
"sEcho": 1,
"iTotalRecords": "383",
"iTotalDisplayRecords": "383",
"aaData": [
["365", "Checkbox", "DONOTUSE1", "", "", "", "Unknown Use", "Unknown Use", "0"],
["366", "Checkbox", "DONOTUSE1", "", "", "", "Unknown Use", "Unknown Use", "0"],
["367", "Checkbox", "DONOTUSE1", "", "", "", "Unknown Use", "Unknown Use", "0"],
["368", "Checkbox", "DONOTUSE1", "", "", "", "Unknown Use", "Unknown Use", "0"],
["369", "Checkbox", "DONOTUSE1", "", "", "", "Unknown Use", "Unknown Use", "0"],
["370", "Checkbox", "DONOTUSE1", "", "", "", "Unknown Use", "Unknown Use", "0"],
["371", "Checkbox", "DONOTUSE1", "", "", "", "Unknown Use", "Unknown Use", "0"],
["372", "Checkbox", "DONOTUSE1", "", "", "", "Unknown Use", "Unknown Use", "0"],
["373", "Checkbox", "DONOTUSE1", "", "", "", "Unknown Use", "Unknown Use", "0"],
["374", "Checkbox", "DONOTUSE1", "", "", "", "Unknown Use", "Unknown Use", "0"]
]
}
[/code]
so the warning is correct - it is invalid JSON.
Allan
I'm using the examples provided in the download. I would assume those are working examples, but maybe not? Can you point me in the right direction for fixing this?
Thanks for the feedback Allan.
There is something in the code you are using that is echoing that out for whatever reason. Given that there are 10 instances of the string 'Array' I would suggest that there is something in the loop for processing each row that is echoing that out for whatever reason. There shouldn't be anything in the examples that does that.
Allan