php - No data returned to jquery datatables from ajax call -
This is my first try dataatables
with the database ( MariaDB
) I want to call the Ajax
function to return data and populate the rows
and cells
table
The simplified version of code about the php
file table
of the table is:
Datacenem ({"BPC section": true, "SXXSOR "):" / APLS / Indicador / "", "Data": "data": "data type": "json", "type": "data"; "data", "fns server data", "fns server data": "data": {"fn": " "{{GET}," url: sSource, "data" ": indie_on," success ": fnCallback});" AO column ": [{" mDataProp ":" id "}, {" mDataProp ": "Per"},],}); I have tried with and without "bServerSide": True,
but table
Can not display data in. Firebug
Return typeError: aData is undefined
.
In whatever is being said I have created a function in php
which gives structure like json
.
Like I said, I have no experience with datatable
, I do not know whether aata or Is to use aaData , or to try more.
Here is another example for the AJAX source:
It says:
Datatyls expect an object with the data source called "Aadata" with the array.
Here's some of your AJAX returns:
{"Aadata": [["Tadent", "Internet Explorer 4.0", "Win95 +", "4", "X"], ["Teddent", "Internet Explorer 5.0", "Win95 +", "5", "C"], ["Teddent", "Internet Explorer 5.5 "," "95", "5.5", "A" "," Trident "," Internet Explorer 6 "," Win 98 + "," 6 "," A "], [" Trentent "," Internet Explorer 7 "," Win XP SP2 + "," 7 "" A "], ... [" Miscellaneous "," Link "," Text Only "," - "," X "], [" Miscellaneous " "Links", "Text Only", "-", "X"], ["Miscellaneous", "I Mobile "," Windows Mobile 6 "," - "," C "], [" Miscellaneous "," PSP Browser "," PSP "," - "," C "], [" Other Browser " I always use aaData to start the table data. "" All other "," - "," - "," U "]]
Apart from this, you have more options to complete your options (like sEcho
, iTotalRecords
, iTotalDisplayRecords
, ...) can render back
Comments
Post a Comment