Quantcast
Channel: DataTables 1.10 — DataTables forums
Viewing all articles
Browse latest Browse all 2364

Multi column search

$
0
0

I have some search fields on the same page as DataTable(). I have built this search function to submit all field content when any field has data changed:

 dt = jQuery('#rowblock').DataTable({
          "processing": true,
          "serverSide": true,
          "searching": false,
          "lengthMenu": [[25, 100, -1], [25, 100, "All"]],
          "sPaginationType": "full_numbers",
          "ajax": 'admin.php?gadmtable=&gadmaction=getgriddata',
          "columnDefs": [{
              "targets": [ 8,11,12,13 ],
                         "render": function ( data, type, full, meta ) {
                             if (type === "display"){
                                 return jQuery("<div />").html(full[meta.col]).text();
                             }else{
                                 return data;
                             }
                        } 
          } ]
      });


  function search(){
      var search = [];
      jQuery('#filterfields :input').each(function() {
          search.push(this.value);
      })
      dt.search( search.join('&'))
      .draw();
  }

However I see no parameter added to the GET request, all search parameters are empty. Any idea what I am missing?


Viewing all articles
Browse latest Browse all 2364

Trending Articles