We help IT Professionals succeed at work.

filter DataTables on open

UniqueData
UniqueData asked
on
I am using datatables.net plugin to display data.

I need to be able to open a page and have the table filtered using a url parameter. Is this possible?
Comment
Watch Question

Most Valuable Expert 2013
Awarded 2012
Commented:
Hi,
yes this is possible.
Just call the search function of the datatable:
var table = $('#example').DataTable();

var urlValue = ...;
table.search(urlValue ).draw();

Open in new window


HTH
Rainer

Author

Commented:
perfect.  thanks.