2 DB driven tables, cant refresh the sec one.
2 DB driven tables, cant refresh the sec one.
Hy i have 2 tables on 1 page which are fully DB handled.
like in : http://datatables.net/release-datatables/examples/data_sources/server_side.html
2 instances of em. Now i need to redraw once 1 and other time the other one. But in end i wind up only reloading the last one defined.
My question is. do i have to somehow clone the damn class or wtf is wrong with it. once when i created the data table i named the var otable1 and other time otable2 but which ever i redraw with the fnDraw() function only the last one gets reloaded... i see tht on my debuger on the backed script.... How can i reload them seperatly?
The tables have different backend handlers so there is no possibility i am wrong. My only question is how can i make 2 different fnDraw calls?
like in : http://datatables.net/release-datatables/examples/data_sources/server_side.html
2 instances of em. Now i need to redraw once 1 and other time the other one. But in end i wind up only reloading the last one defined.
My question is. do i have to somehow clone the damn class or wtf is wrong with it. once when i created the data table i named the var otable1 and other time otable2 but which ever i redraw with the fnDraw() function only the last one gets reloaded... i see tht on my debuger on the backed script.... How can i reload them seperatly?
The tables have different backend handlers so there is no possibility i am wrong. My only question is how can i make 2 different fnDraw calls?
This discussion has been closed.
Replies
[code]
var otable1 = $('#table1').dataTable();
var otable2 = $('#table2').dataTable();
otable1.fnDraw();
otable2.fnDraw();
[/code]
That will redraw first table 1 and then table 2.
Allan
Thy for the effort anyway.