How to pass extra parameter in ajax call to php using jQuery DataTables?
Here is my code
$(document).ready(function() {
var dataTable = $('#student-grid').DataTable( {
responsive: {
details: {
renderer: function ( api, rowIdx ) {
var data = api.cells( rowIdx, ':hidden' ).eq(0).map( function ( cell ) {
var header = $( api.column( cell.column ).header() );
return '<p style="color:#00A">'+header.text()+' : '+api.cell( cell ).data()+'</p>';
} ).toArray().join('');
return data ? $('<table/>').append( data ) : false;
}
}
},
processing: true,
serverSide: true,
ajax: "borrowedBookNew.php" // json datasource
} );
} );
I want to pass a new parameter to my php file and get a new result.