Get XHR and set values dynamically with jQuery Datatables?

2

I'm using the Jquery plugin DataTable and it works, with AJAX, basically as follows:

You receive a JSON of your request and must contain these two data: ("recordsTotal", "recordsFiltered") and also all the data that will be displayed in the table for perfectly paging. >

I'm working, in this situation, with ServerSide processing. The business is that in the system I use the additional information (these paging) does not come in the JSON body, but in the return headers (which I can not change). So my questions are:

  • How do I capture this XHR data in return by DataTable ?;
  • How do I set these properties ("recordsTotal", "recordsFiltered") to the values I get from the headers?

I researched a lot and tried a thousand possible ways, and I was not able to solve this problem yet. Their site offers a debug then follows the debug link of my DataTable in case someone needs it: It also contains the code I'm using.

DataTable Debug ()

    
asked by anonymous 29.05.2014 / 14:04

1 answer

1

As requested by our friend Maniero I am answering my question.

I could not solve the above problem. I made a fork of the project in GitHub, changed what I needed, and forwarded a pull request to the developer. He thanked the submission, but said that at the moment, he does not think about making such a resource available and will study the feasibility of it in the future.

The solution was to make adjustments in PHP in order to continue using DataTable .

    
16.10.2014 / 15:20