Two Tables: One Ajax Source
Two Tables: One Ajax Source
randyesqq
Posts: 2Questions: 0Answers: 0
I have searched around and have not found this scenario come up so I am posting to see if anyone else knows what to do. Bascially I have two tables on the same page and one ajax call that supplies the data for both of them. The data looks like this:
[code]
data['test'] = {'aaData': [ .... lots of data .... ]
data['protocol'] = {'aaData': [ .... lots of other data .... ]
[/code]
The server sends data for both of the tables because the backend code to create the 'test' and the 'protocol' is reused heavily and no one will need only one portion. Both need to be delivered.
I have always used sAjaxSource, even with multiple tables, but in those cases, the URLs were different and obviously the data was separate. I would like to know if there is a way to fetch the data via ajax and then split it out so each tables gets the right data.
Thanks!
[code]
data['test'] = {'aaData': [ .... lots of data .... ]
data['protocol'] = {'aaData': [ .... lots of other data .... ]
[/code]
The server sends data for both of the tables because the backend code to create the 'test' and the 'protocol' is reused heavily and no one will need only one portion. Both need to be delivered.
I have always used sAjaxSource, even with multiple tables, but in those cases, the URLs were different and obviously the data was separate. I would like to know if there is a way to fetch the data via ajax and then split it out so each tables gets the right data.
Thanks!
This discussion has been closed.
Replies