Reputation: 477
Has anyone ever sent a search request from one page to the dataTables jquery plugin on another page? I'm not sure if its even designed to work that way.
Upvotes: 0
Views: 1531
Reputation: 11
I think this is what you are looking for:
$('#dataTableBLOCK').dataTable( {
"oSearch": {"sSearch": "YOUR-SEARCH-VALUE"},
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "NAME-OF-DATATABLES-FILE.php"
} );
By changing YOUR-SEARCH-VALUE
to a $_POST
or $_GET
value you make dataTables search what you were searching somewhere else.
Upvotes: 1
Reputation: 1185
I am very sure that the search will only work when you are in the same page. The search box will filter the displayed rows of the table when the dataTables plugin is used.
Upvotes: 0