Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82145

multiple filter does not work in multiple tables

$
0
0
Hi, I'm Argentine.
I have 3 tables on 3 different tabs and filters work only columns in the first table in table 1. The filters do not work the other tables. Here is the code.
I use thead input
The urgent need to deliver a job. Thank you very much for helping

The first table code

<script type="text/javascript">
var asInitVals = new Array();
$(document).ready(function () {
var oTable1 = $('#faproadq').dataTable( {
"sPaginationType": "full_numbers",
"oLanguage" : {
"sUrl" : "media/dataTables/config_tabla.txt"
},
"iDisplayLength": 10,
"aoColumns":[
null,
null,
null,
null,
null,
null,
null,
{"bVisible": false}

],
"sSearch": "Search all columns:",
"bJQueryUI": true
});

$("#faproadq thead input").keyup( function () {
/* Filter on the column (the index) of this element */
oTable1.fnFilter( this.value, $("thead input").index(this) );
} );

$("#faproadq thead input").each( function (i) {
asInitVals[i] = this.value;
} );
});
</script>


The second table code

<script type="text/javascript">
var asInitVals = new Array();
$(document).ready(function () {
var oTable2 = $("#faproadq2").dataTable({
"sPaginationType": "full_numbers",
"oLanguage" : {
"sUrl" : "media/dataTables/config_tabla.txt"
},
"iDisplayLength": 10,


"sSearch": "Search all columns:",
"bJQueryUI": true
});
$("#faproadq2 thead input").keyup( function () {
/* Filter on the column (the index) of this element */
oTable2.fnFilter( this.value, $("thead input").index(this) );
} );
$("#faproadq2 thead input").each( function (i) {
asInitVals[i] = this.value;
} );
});
</script>

Viewing all articles
Browse latest Browse all 82145

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>