Hi,
i've got this error when i try to initialize a dataTable:
I searched in this forum, and elsewhere, but could find what i'm doing wrong.
If you can explain my mistakes, thanks.
The html :
The js
The json
Thanks for your replies.
i've got this error when i try to initialize a dataTable:
DataTables warning (table id = 'Table_Verifications'): Requested unknown parameter 'Status' from the data source for row 0
I searched in this forum, and elsewhere, but could find what i'm doing wrong.
If you can explain my mistakes, thanks.
The html :
<table id="Table_Verifications"> <thead> <tr> <th> Status </th> <th> Date </th> <th> Email </th> </tr> </thead> <tbody></tbody> </table>
The js
$("#Table_Verifications").dataTable({ 'bAutoWidth': false, // Disable columns width calculation, it's faster and sometimes produce very tiny columns. 'bProcessing': true, // Show "processing..." message during script processing 'bServerSide': true, // Tell datatables we'll use server-side processing 'sAjaxSource': '/admin/operational/getverifications', // name of Perl script which will return 'aoColumns':[ {'mData' : 'Status'}, {'mData' : 'Date'}, {'mData' : 'Email'} ] });
The json
{"sEcho":1,"iTotalRecords":2,"iTotalDisplayRecords":2,"aoColumns":[{"mDataProp":"Statut"},{"mDataProp":"Date"},{"mDataProp":"Email"}],"aaData":[["en_attente","2012-11-21 17:51:22","henricarte@yopmail.com"],["en_attente","2012-11-22 10:39:37","nicolas.lamblin@yopmail.com"]]}The debugger Link : http://debug.datatables.net/enuqur
Thanks for your replies.