DataTable Warning: table id=XXX - ajax error.
DataTable Warning: table id=XXX - ajax error.
I Validate the json in "http://jsonlint.com/", and result is "Valid JSON".
But I got this error message. "DataTable Warning: table id=XXX - ajax error."
Why did i get this error message?
My Html is:
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="css/jquery.dataTables.css" />
<!-- jQuery -->
<script type="text/javascript" charset="utf8" src="scripts/jquery.js"></script>
<!-- DataTables -->
<script type="text/javascript" charset="utf8" src="scripts/jquery.dataTables.js"></script>
<script type="text/javascript" src="scripts/index.js"></script>
</head>
<body>
<table id="tbl01" class="display">
<thead>
<tr>
<th>
PK_Id
</th>
<th>
DF_OrderTime
</th>
<th>
DF_PayTime
</th>
<th>
companyName
</th>
<th>
DF_PosName
</th>
<th>
DF_YJine
</th>
</tr>
</thead>
<tbody>
</tbody>
<tfoot>
</tfoot>
</table>
<div id="div01">
</div>
</body>
js is:
function bindDataTable(json) {
$('#tbl01').dataTable({
ajax: json
// "columns": [
// { "data": "PK_Id" },
// { "data": "DF_OrderTime" },
// { "data": "DF_PayTime" },
// { "data": "companyName" },
// { "data": "DF_PosName" },
// { "data": "DF_YJine" }
// ]
});
}