Multi Columns search
Multi Columns search
deliator
Posts: 95Questions: 1Answers: 0
Hi,
I tried to use this code from Allan :
http://live.datatables.net/piqidoqo/1/edit
I've modified the source like this :
// Simple server-side processing
$(document).ready(function() {
// Setup - add a text input to each footer cell
$('#example tfoot th').each(function() {
var title = $(this).text();
$(this).html('<input type="text" placeholder="Search ' + title + '" />');
});
var table = $('#example').dataTable({
"processing": true,
"serverSide": true,
"ajax": {
url: 'data.cfm',
dataSrc: 'persons',
complete: function(xhr, textStatus) {
console.log('Statuscode : ' + xhr.status);
}
},
"initComplete": function() {
var api = this.api();
// Apply the search
api.columns().every(function() {
var that = this;
$('input', this.footer()).on('keyup change', function() {
if (that.search() !== this.value) {
that
.search(this.value)
.draw();
}
});
});
}
});
});
Status code 200 is returned when a stringis is typed, but filter is not applied ...
Thanks for help
Marc
This discussion has been closed.