empty json to datatable
empty json to datatable

hello,
my datatable works gr8 wen there is data in the mysql table passed to it by json.
but wen there are no rows in mysql table, thats where the problem comes.
i have set this:
"language": {
"infoEmpty": " ",
"emptyTable": " ",
"zeroRecords": " - "
and this messages come, but i noticed in browser console that it keeps giving TypeError c is not defined.
wen there are no rows, i am returning this json :
"{\"sEcho\": \"3\",\"iTotalRecords\": 0,\"iTotalDisplayRecords\": 0,\"data\":[]}"
pls can anyone help ?
Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
This discussion has been closed.
Answers
That doesn't look like JSON - but rather just a simple string. You need to return:
Worth noting also that you are using the legacy format rather than the 1.10 format for whatever reason.
Allan