I'm working on an implementation of Datatables, but there was a need to send the id to do the filters:
$(document).ready(function() {
var dataTable = $('#employee-grid').DataTable( {
responsive: false,
"order": [[ 1, "asc" ]],
"aoColumns": [
null,
null,
null,
null
],
//"scrollY": 400,
"scrollX": true,
"iDisplayLength": 100,
"processing": true,
"serverSide": true,
"ajax":{
url :"../php/admin_gerente_cidade.php",
type: "post",
error: function(){
$(".employee-grid-error").html("");
$("#employee-grid").append('<tbody class="employee-grid-error"><tr><th colspan="3">Nenhum resultado encontrado</th></tr></tbody>');
$("#employee-grid_processing").css("display","none");
}
}
} );
} );
If I put
url :"../php/admin_gerente_cidade.php?id=<?php $id; ?>"
It does not work.
Would it be possible to pass an id via POST?