Filter input in FixedHeader
Filter input in FixedHeader
acicovic
Posts: 1Questions: 0Answers: 0
Hi,
First of all, if you're reading this Allan, I want to compliment you on the skill it takes to create a plugin of such quality. Architecture, code and feature wise this must be the best jQuery table plugin.
I need the forum's help on integrating the filter input in a table header which implements FixedHeader. Without FixedHeader, I am able to add a regular input in the header and filter using fnFilter()
However, when I make the header fixed, the input is lost when I press a key. I created a function which restores the value in the textbox along the lines of:
[code]
// function is executed on keyup
function showValue(th)
{
myValue = th.value;
if (lastValue != myValue) {
lastValue = myValue;
oTable.fnFilter(myValue);
$('#example #filter').val(myValue);
$('#example #filter').focus();
}
}
[/code]
This works fine for Firefox, is problematic on IE8 (caret position is reset - though I could obviously fix this) and fails miserably on IE6 (I don't even understand what happens) to the point it seems futile to go this route.
So my question is, is it possible to somehow integrate a filter input in the table header when it implements FixedHeader?
First of all, if you're reading this Allan, I want to compliment you on the skill it takes to create a plugin of such quality. Architecture, code and feature wise this must be the best jQuery table plugin.
I need the forum's help on integrating the filter input in a table header which implements FixedHeader. Without FixedHeader, I am able to add a regular input in the header and filter using fnFilter()
However, when I make the header fixed, the input is lost when I press a key. I created a function which restores the value in the textbox along the lines of:
[code]
// function is executed on keyup
function showValue(th)
{
myValue = th.value;
if (lastValue != myValue) {
lastValue = myValue;
oTable.fnFilter(myValue);
$('#example #filter').val(myValue);
$('#example #filter').focus();
}
}
[/code]
This works fine for Firefox, is problematic on IE8 (caret position is reset - though I could obviously fix this) and fails miserably on IE6 (I don't even understand what happens) to the point it seems futile to go this route.
So my question is, is it possible to somehow integrate a filter input in the table header when it implements FixedHeader?
This discussion has been closed.