Empty Ajax Response wont render in DataTables 1.10
Empty Ajax Response wont render in DataTables 1.10
Hello,
first good work on Version 1.10. Yesterday I updated and "everything" work smoothly. I only got a small problem, when sending an empty array - processing message wont stop (only when i click on a table header for sorting) and i get the console error "Cannot read property 'length' of undefined" on Line .min.js:43.
In 1.9 it is working, without console error
I tried an empty array and one with total record 0, both not working.
http://debug.datatables.net/iquhih
Cheers from Austria
Hannes
This question has an accepted answers - jump to answer
Answers
Hello,
fixed it. Added sEcho and iTotalDisplayRecords.
My working PHP Code for empty tables:
edit: sorry dont know how to set the question answered :(
Doesn't appear to be a way to do it by yourself, however when someone else responds to your thread I believe it automatically marks it as answered but not accepted. You should be able to accept that persons answer as correct if you're pleased with their response. It's odd that there doesn't seem to be a way to do that to your own posts though.
Glad to hear you figured it out though =)