Getting and evaluation additional data from server reply

Getting and evaluation additional data from server reply

Phil1881Phil1881 Posts: 2Questions: 0Answers: 0
edited March 2013 in DataTables 1.9
Hello everybody!

First of all: Thanks for this great tool. I really like it!

I created a nice table with server side processing and a separate form with advanced search options. Thanks to the function fnServerParams I can add these extra parameters to the request.

Some input fields need to be validated by the server. I would like to return an error message to the client if this failed. Simply imagine a date input...

Is there a JS function call with which I can interpret the server reply?

Thanks for your ideas!
Phil1881

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Yes, listening for the `xhr` event is currently the easiest option - http://datatables.net/docs/DataTables/1.9.4/#xhr . The other option is to override fnServerData .

    Allan
  • Phil1881Phil1881 Posts: 2Questions: 0Answers: 0
    Hi Allan,

    thanks a lot for your fast answer.

    I'm asking myself why I didn't find the documentation linked in your answer (http://datatables.net/docs/DataTables/1.9.4/). It's explaining many questions I had and answered myself by try and error. Why don't you link these docs more prominently?

    Philipp
This discussion has been closed.