Reusing a DataTable on same page but with different data
Reusing a DataTable on same page but with different data
Hi,
I have two DataTables on one page. They have the same format and number of columns but the data in them is different. I am retrieving the data from the server (Oracle DB). So, my page is built using PL/SQL with my jquery script file linked in. Basically, I am calling a procedure to load the table with one set of data, then calling the procedure again to load another table (with identical structure) with another set of data.
Right now, I have two DataTables in my jquery file, defined identically, just with different IDs. I would prefer to have just the one DataTable defined and reuse it.
I tried to do an example here:
http://live.datatables.net/juguyaci/1/edit
My question: can you reuse a DataTable structure on the same page? If so, how?
Thanks.