I want to export the visible data in datatable to CSV format. Here is my code,I have added following code
var $table=$('#example').dataTable
( {
"bFilter": false,
"processing": true,
"serverSide": true,
"bDestroy": true,
"bJQueryUI": true,
"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"aButtons": [ "csv", "xls", "pdf" ]
},
"ajax": {
'type': 'POST',
'url': 'getResult.php',
'data': {
formName:'afscpMcn',
action:'search',
mcn_no: document.getElementById('mcn_no').value,
cust_nm:document.getElementById('cust_name').value,
emp_id: document.getElementById('employ_name').value
}
}
});