[DT 1.10] Refresh HTML table
[DT 1.10] Refresh HTML table

Hello,
Here is my example :
http://live.datatables.net/juxayame/3/
On button click i need to refresh the table content
Thanks
This discussion has been closed.
Hello,
Here is my example :
http://live.datatables.net/juxayame/3/
On button click i need to refresh the table content
Thanks
Replies
What do you want to refresh the table with?
Your example does really explain what you are wanting to do.
Kevin
The content of the table is the result of a query located in the same html page (language is coldfusion)
I fi click one of the buttons it makes an ajax call to the file ajaxFilter.cfm with a parameter 'action' equal to On or Off, the page ajaxFilter.cfm is just the definition of a session variable depending of the passed parameter.
For example in this test : session.age = 26, then the query is adapted.
I just have to reload the table.
Link adapted : http://live.datatables.net/juxayame/4/
You want to update the Datatable with the
data
parameter in thedone
function, correct?If so then you probably will want to use
clear()
to clear the table then userows.add()
to add thedata
passed into thedone
function.Kevin
Thanks Kevin, i changed the way i use the plugin. I'm using the server side option.
So i just have to use :
$('#data').DataTable().ajax.reload();
Paging is working correctly, search is working too (display of info is changed) but i don't know why the table refresh is not working.
I can't give you a live example because page is on the intranet
here is the script :
Marc
Ok, i made a mistake in the data source :-)
Resolved by myself, thanks for help.
Regards,
marc