How to send 2 ajax json files ?
How to send 2 ajax json files ?
islamelshobokshy
Posts: 99Questions: 20Answers: 1
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.