Hello all. I'm getting my info from a database, and I get the error TypeError: undefined is not an object (evaluating 'j[k].style').
Here is the code ajax code I'm using
$(document).ready(function() {
var table = $('#example').DataTable( {
"ajax": "includes/payroll.php",
"columns": [
{
"className": 'details-control',
"orderable": false,
"data": null,
"defaultContent": ''
},
{ "data": "empNum" },
{ "data": "empName" },
{ "data": "appFlag"},
{ "data": "unitRate" },
{ "data": "salary" },
{ "data": "hourly"},
{ "data": "appr1"},
{ "data": "appr2"},
{ "data": "appr3"},
{ "data": "appr4"},
{ "data": "appr5"}
],
"order": [[1, 'asc']]
} );
and here is an example of an array I'm returning from the database
{
"data": [
{
"empNum": "1",
"empName": "BAKER, MARK E. ",
"unitRate": 0,
"salary": 3282.84,
"hourly": 0,
"appFlag": " ",
"app1": "K002 1 ",
"app2": " ",
"app3": " ",
"app4": " ",
"app5": " "
}
I don't know what I'm doing wrong or how to fix this. I've been searching and trying for about 6 hours now. Please help