Global Parameter Option in Ajax Call
Global Parameter Option in Ajax Call
giviz
Posts: 1Questions: 1Answers: 0
Hi,
I have a DataTables looking like this :
var table = $('#list').DataTable( {
"processing": true,
"serverSide": true,
"ajax": function(data, callback, settings) {
$.get('/pictures/json?', {
draw: data.draw,
limit: data.length,
offset: data.start,
sort: sortString(data),
search: data.search['value'],
vertical_id: data.columns[3].search.value,
niche_id: data.columns[4].search.value,
format: data.columns[5].search.value,
option1: data.option1,
}, function(res) {
I use various selects to modify the search value of all columns like this :
table.columns(3).search( 10 ).draw();
And it's working fine.
Now, I would like to access directly to option1 to set it's value when a select or a checkbox to filter the table is changed.
But option1 is NOT a column, it's a toggle flag for example to hide rows matching a given status.
What JS call could I make to alter that value and redraw the table ?
table.data.option1 = 10;
table.draw();
is not working.
Any idea ?
Thank !!
This discussion has been closed.