Two dataTables with search fields, want to search buttons for each table.
Two dataTables with search fields, want to search buttons for each table.

I have tried several things and they seem to overlap when I select search on one:-
_initComplete : function($table) {
//var input = $('.dataTables_filter input').unbind(),
var input = $table.unbind();
self = $table.api(),
$searchButton = $('<button>')
.text('Search')
.click(function() {
self.search(input.val()).draw();
}),
$clearButton = $('<button>')
.text('Clear')
.click(function() {
input.val('');
$searchButton.click();
})
//$('.dataTables_filter').append($searchButton, $clearButton);
$table.append($searchButton, $clearButton);
//failed attempts to add using the table ids.
//$table.attr("id", "non_validated_list").append($searchButton, $clearButton)
//$("#vendor_list").append($searchButton, $clearButton);
//$("#non_validated_list").append($searchButton, $clearButton);
Any Ideas?
Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide
This discussion has been closed.
Answers
We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Thank you for the advise Colin.
I will update with a test case.