Initialize with default search
Initialize with default search

Is there a way to initialize datatables with a default search in the input box? I'd like to add a datatable to product pages with the product selected but allow people to refine their search.
I've been able to set the input box value with jQuery, but I haven't figured out how to submit it since it's requires a keypress.
$('#example_filter label input[type=text]').val('Default Product')
Edit: I forgot to add if it's not obvious that I'm doing server side.
TIA
I've been able to set the input box value with jQuery, but I haven't figured out how to submit it since it's requires a keypress.
$('#example_filter label input[type=text]').val('Default Product')
Edit: I forgot to add if it's not obvious that I'm doing server side.
TIA
This discussion has been closed.
Replies
$('#example_filter label input[type=text]').val('Default Product').trigger($.Event("keyup", { keyCode: 13 }));
However it's making two calls to the server.
Yes - the oSearch parameter allows this.
Allan