Problems with Multi-Database with Multiple search boxes

Problems with Multi-Database with Multiple search boxes

lp1981lp1981 Posts: 3Questions: 0Answers: 0
edited November 2013 in DataTables 1.9
Ive searched around and had no luck, so here goes.

Full disclosure i'm a complete newb with jquery/html/php.

Essentially I have a tabular format page, with a different datatables on each tab. Both tables load perfectly fine, and I can use the "search all" box, as well as being able to click sort on a given column.
However i'm using the search on each column functionality, and on my second datatable, its not working.

Script + Tab html here:

[code]


var asInitVals = new Array();

$(document).ready(function() {
var oTable = $('#iom_example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "../media/server_processing.php",

"oLanguage": {
"sSearch": "Search all columns:"
}
} );

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



/*
* Support functions to provide a little bit of 'user friendlyness' to the textboxes in
* the footer
*/
$("tfoot input").each( function (i) {
asInitVals[i] = this.value;
} );

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

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






var asInitVals = new Array();

$(document).ready(function() {
var oTable = $('#prdexample').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "../media/server_processing_PRD.php",

"oLanguage": {
"sSearch": "Search all columns:"
}
} );

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



/*
* Support functions to provide a little bit of 'user friendlyness' to the textboxes in
* the footer
*/
$("tfoot input").each( function (i) {
asInitVals[i] = this.value;
} );

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

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



[/code]



When using firebug I can actually see BOTH "GET's" when entering a value on the second database, whereas when entering a search term on the first database only the first GET is shown. This is obviously the issue, but I have no idea how to fix.

Debugger ==> http://debug.datatables.net/apetad


Any ideas would be greatly appreciated, thank you!

Replies

  • lp1981lp1981 Posts: 3Questions: 0Answers: 0
    Tabular Code:

    [code]







    tab1
    tab2
    tab3
    tab4
    tab5
    Database1
    Database2











    Major
    Minor
    Node
    Workload
    Block Size
    Queue Depth
    MB/S
    IOPS
    Latency




    Loading data from server

























    Major
    Minor
    Platform
    SSD Size
    Workload
    Size
    Pattern
    Max IOPS
    Target IOPS
    Latency @Target IOPS




    Loading PRD data from server



















    [/code]
  • lp1981lp1981 Posts: 3Questions: 0Answers: 0
    bump.
This discussion has been closed.