Individual column filtering not work

Individual column filtering not work

Vincent74Vincent74 Posts: 3Questions: 0Answers: 0
edited January 2013 in DataTables 1.9
Hello, first of all sorry for my bad english and congratulations for this amazing JQuery utility!!
I've configurated my own but I have a problem: the page is ready but I don't understand where and how exactly place the js code to run the "individual column filtering".
I've done so many attemps but does not work and now I'm totally confused, so much so that I have temporarily removed the piece of code from the page!
Can you help me please? This is what I have in the page:

[code]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">





Indice schede micologiche

@import "../../schede/page.css";
@import "../../schede/table_jui.css";
@import "../../schede/jquery-ui-1.8.4.custom.css";




$(document).ready(function() {
$('.dataTable').dataTable( {
"aLengthMenu": [[15, 25, 35], [15, 25, 35]]
} );
} );






(function(){
var bsa = document.createElement('script');
bsa.type = 'text/javascript';
bsa.async = true;
bsa.src = '//s3.buysellads.com/ac/bsa.js';
(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(bsa);
})();

//setTimeout( function () {
// if ( typeof _bsap != 'undefined' ) {
// $('#header_advert>a').css('display', 'block');
// }
// else {
// $('#donate_advert').click( function() {
// window.location.href = "/donate";
// } ).css('display', 'block');
// }
//}, 3000 );











Genere
specie
Autore
Famiglia
Commestibilità



..................
















[/code]

Replies

  • Vincent74Vincent74 Posts: 3Questions: 0Answers: 0
    Hello, after other attemps now it works and works fine!
    I've only a problem, this notice that appears when I load or refresh the page (after press return all works fine):

    DataTables warning (table id = 'DataTables_Table_0'):Cannot reinitialise Data Table.
    To retrieve the DataTables object forthis table, pass no arguments or see the docs for bRetrieve and bDestroy.

    This is the JS:
    [code]
    $(document).ready(function() {
    $('.dataTable').dataTable( {
    "aLengthMenu": [[15, 25, 35], [15, 25, 35]]
    } );
    } );

    var asInitVals = new Array();

    $(document).ready(function() {
    var oTable = $('.dataTable').dataTable( {
    "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)];
    }
    } );
    } );
    [/code]

    Any help would be welcome, thank you.
    Vincent
  • Vincent74Vincent74 Posts: 3Questions: 0Answers: 0
    Thanks for the reply, you can close the post because I solved alone ... goodbye
This discussion has been closed.