How to autofill search box from a passed search paramater?
How to autofill search box from a passed search paramater?
tommym
Posts: 2Questions: 0Answers: 0
I am using rails, and passing a search parameter to a data tables view. What would the best way be to populate the search box with this parameter? I was thinking of doing it in the controller, but not sure if jquery would work better....anyone done something similar? Thanks.....
This discussion has been closed.
Replies
$("#learningresource").dataTable
aoSearchCols: [
sSearch: "Webkit",
null,
null,
null,
null,
null,
null,
null,
null]
sDom: "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>"
sPaginationType: "bootstrap"
bProcessing: true
bServerSide: true
sAjaxSource: $('#learningresource').data('source')
This is the code (coffee script) I am using, it generates the table fine, but does not filter on sSearch.....I know I am doing something stupid ;)