Error in server-side processing causes "Processing" box to hang, no user feedback

Error in server-side processing causes "Processing" box to hang, no user feedback

jgentiljgentil Posts: 2Questions: 0Answers: 0
edited January 2013 in Plug-ins
Hello. I'm using DataTables with the Server-side Processing plugin and an Ajax source. Sometimes, for whatever various reasons, we return an error instead of a DataTables table array which needs to be presented to the end-user. I can't find any documentation on how to hook into the DataTables ajax call to watch for and handle errors. Is there a jQuery event that I can watch for the error, or a callback I can register for handing errors? Right now it just hangs at "Processing" any time the error is returned, with no user feedback at all.

Thank you!

Replies

  • jgentiljgentil Posts: 2Questions: 0Answers: 0
    edited January 2013
    Er, to update: It looks like it also throws a TypeError because aData is undefined.

    TypeError: aData is undefined
    /static/datatables/jquery.dataTables.js
    Line 2038
  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin
    Please link to a test case, otherwise we don't really stand much of a chance of being able to help. See: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read

    > I can't find any documentation on how to hook into the DataTables ajax call to watch for and handle errors.

    Use fnServerData .

    Allan
This discussion has been closed.