got Notice: Undefined index: iColumns
got Notice: Undefined index: iColumns
I tried to retrieve data from mongodb by using server_processing.php I downloaded from this site. I edit server_processing.php to connect to my mongodb as:
mb_internal_encoding('UTF-8');
$database = 'mydb';
$collection = 'mycollection';
and copied row_detail.html from examples and edited it as:
$(document).ready(function() {
var table = $('#example').DataTable( {
"bServerSide": true,
"processing": true,
"ajax": "../server_side/scripts/server_processing.php","dataType": "jsonp",
"columns": [
{
"class": 'details-control',
"orderable": false,
"data": null,
"defaultContent": ''
},
{ "data": "file_id" },
{ "data": "company" },
{ "data": "trading_partner" },
{ "data": "functional_group" }
],
"order": [[1, 'asc']]
} );
I got invalid JSON response. Response detail shows Undefined index: iColumns.
I am new to this. Can anyone help me to do a simple retrieve data from server_side using DataTables?
Thanks
Answers
I resolved the issue.