I have this code to draw datatables, so I try to get data from server in JSON format but I need to send data: ajdi variable... My code:
function drawMeh() {
$('#Meh').dataTable({
"ajax": "track_meh.php",
paging: false,
//"dom":' <"search"f><"top"l>rt<"bottom"ip><"clear">',
// end ,
"columns": [{
"data": "ID"}, {
"data": "datum"}, {
"data": "masina"},{
"data": "radnih_sati"},{
"data": "kolicina"},{
"data": "cena"},{
"data": "ukupno"},{
"data": "akcija"
}
],
"columnDefs": [
{
"targets": 7,
"data": "akcija",
"render": function(data, type, full, meta) {
// return data;
return '<div style="float:right;"><i class="fa fa-close"></i></div>';
}
},
{
"targets": [0],
"visible":false
}
]
});
};
How I can send data: ajdi to server to get right JSON data from track_meh.php ?