How to send 2 ajax json files ?
How to send 2 ajax json files ?
![islamelshobokshy](https://secure.gravatar.com/avatar/61c44b8539ec4778cd9407d1516b5664/?default=https%3A%2F%2Fvanillicon.com%2F61c44b8539ec4778cd9407d1516b5664_200.png&rating=g&size=120)
I want to send 2 ajax json files to datatables, one to be used to the body, and one for the footer in the FooterCallback. How can I do so?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @islamelshobokshy ,
For the body, you would let DataTables do the Ajax legwork, as in the examples in this section here.
For the footer, you would just make a handcrafted Ajax request in the
footerCallback
, then parse and load that data yourself.Hope that helps,
Cheers,
Colin
Thanks for your replies! Can the footer use a json object if I made the ajax call somewhere else?
The
footerCallback
just needs access to the data that you want to use - so it can reference a global variable, initiate an Ajax call to get the data itself, or just use it's own logic.