Individual column searching (text inputs) and hidden columns

Individual column searching (text inputs) and hidden columns

betrachterbetrachter Posts: 1Questions: 0Answers: 0
edited August 2014 in Free community support

Hi there, I apologize in advance for my english.
I have a small problem. I use "Individual column searching (text inputs)":

<th><input type="text" name="name" value="Hostname" class="search_init"></input></th>
<th><input type="text" name="dep" value="Department"class="search_init"></input></th>
<th><input type="text" name="username.name" value="Username" class="search_init"></input></th>
<th><input type="text" name="username.logindatetime" value="Logindatetime" class="search_init"></input></th>

{"mData":"name", "aTargets": [0], "bSortable": false, "visible": true, "searchable": true},
{"mData":"dep", "aTargets": [1], "bSortable": false, "visible": false, "searchable": true},
{"mData":"username.name", "aTargets": [2], "bSortable": false, "visible": true, "searchable": true},
{"mData":"username.logindatetime", "aTargets": [3], "bSortable": true, "visible": true, "searchable": true}

$("thead input").keyup( function () {
    oTable.fnFilter( this.value, $("thead input").index(this) );
} );

$("thead input").each( function (i) {
    asInitVals[i] = this.value;
} );

$("thead input").focus( function () {
    if ( this.className == "search_init" )
    {
        this.className = "";
        this.value = "";
    }
} );

$("thead input").blur( function (i) {
    if ( this.value == "" )
    {
        this.className = "search_init";
        this.value = asInitVals[$("thead input").index(this)];
    }
} );

Table shows 3 columns: "name", "username.name" and "username.logindatetime"(column "dep" - hidden). When I search by column "username.name" search goes on by hidden column "dep".
How can I fix it?
Thanks!

P.S.: http://live.datatables.net/loporebu/1/edit?html,css,js,output

This discussion has been closed.