Recreating a table using AJAX and a table coming from a PHP page
Recreating a table using AJAX and a table coming from a PHP page
Hi, this is my first post. Great plugin, by the way.
I am using the DataTables.net v.1.9 and the latest version for JQuery.
I am actually loading the page with the table and it works fine. Now the problem is that I would like to recreate the table using a table coming from a PHP file (the actual content result is the HTML table).
I'm using:
$(".tableclass").load("url")
in order to get the html table. After this step, I recreate the table and i replace the previous table with the new one doing a second call of datatable(options).
First I got a warning message about the table can't be initialized and the message suggests to see documentation for bRetrieve or bDestroy.
Than I set them true and the table is replaced correctly when i click on the trigger button, but all the plugin features are not applied to the table.
Before I go on, can anyone please tell me if my goal can be achieved using Datatables or not?
Thanks
I am using the DataTables.net v.1.9 and the latest version for JQuery.
I am actually loading the page with the table and it works fine. Now the problem is that I would like to recreate the table using a table coming from a PHP file (the actual content result is the HTML table).
I'm using:
$(".tableclass").load("url")
in order to get the html table. After this step, I recreate the table and i replace the previous table with the new one doing a second call of datatable(options).
First I got a warning message about the table can't be initialized and the message suggests to see documentation for bRetrieve or bDestroy.
Than I set them true and the table is replaced correctly when i click on the trigger button, but all the plugin features are not applied to the table.
Before I go on, can anyone please tell me if my goal can be achieved using Datatables or not?
Thanks
This discussion has been closed.