Filter on a list box
Filter on a list box
![janke](https://secure.gravatar.com/avatar/f15cc29d0614cf1ab4a59287c9937baf/?default=https%3A%2F%2Fvanillicon.com%2Ff15cc29d0614cf1ab4a59287c9937baf_200.png&rating=g&size=120)
I want to filter with a list box on the head
my code
[code]
$("thead select").change( function () {
oTable.fnFilter( this.value, $("thead input").index(this) );
});
[/code]
This occurs error on line 1191 aoPreSearchCols Null not an object
I resolve this By this code
[code]
$('#composant_sensible').change( function () {
oTable.fnFilter( this.value,2);
});
[/code]
Where composant_sensible is the id of my selectbox
But pearheaps a good idea to integrate to datatable select box on the head or footer.
my code
[code]
$("thead select").change( function () {
oTable.fnFilter( this.value, $("thead input").index(this) );
});
[/code]
This occurs error on line 1191 aoPreSearchCols Null not an object
I resolve this By this code
[code]
$('#composant_sensible').change( function () {
oTable.fnFilter( this.value,2);
});
[/code]
Where composant_sensible is the id of my selectbox
But pearheaps a good idea to integrate to datatable select box on the head or footer.
This discussion has been closed.
Replies
Allan