I am using Datatables server-side processing to populate my table. I want to make each row editable through a pop up modal. So to differentiate between each row, the JSON output from the server contains DT_RowID and all the tr element get their ids. But I am stuck on how to use the DT_RowID so I can pass it to a server side script where I can do whatever to the mysql entry.
So far here is my datatables code:
$(document).ready(function() {
oTable = $('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"bJQueryUI":true,
"sAjaxSource": "processing.php"
} );
} );
and here is my JSON output
Notice: Undefined index: sEcho
{ "sEcho":0, "iTotalRecords":"3", "iTotalDisplayRecords":"3", "aaData":[ {"DT_RowId":"row_1","0":"buick","1":"green","2":"none"},{"DT_RowId":"row_2","0":"toyota","1":"blue","2":"good car"},{"DT_RowId":"row_3","0":"ferrari","1":"red","2":"dream car"} ]}
Sidenote..I am aware that sEcho shouldn't be zero but the table appears anyway.
So far here is my datatables code:
$(document).ready(function() {
oTable = $('#example').dataTable( {
"bProcessing": true,
"bServerSide": true,
"bJQueryUI":true,
"sAjaxSource": "processing.php"
} );
} );
and here is my JSON output
Notice: Undefined index: sEcho
{ "sEcho":0, "iTotalRecords":"3", "iTotalDisplayRecords":"3", "aaData":[ {"DT_RowId":"row_1","0":"buick","1":"green","2":"none"},{"DT_RowId":"row_2","0":"toyota","1":"blue","2":"good car"},{"DT_RowId":"row_3","0":"ferrari","1":"red","2":"dream car"} ]}
Sidenote..I am aware that sEcho shouldn't be zero but the table appears anyway.