Tôi không hiểu tại sao DataTables được ném lỗi này trong FF: Lỗi Loại: e [j] là undefinedJQuery DataTables Plugin: Lỗi Loại: e [j] là undefined
Trong IE nó báo là: Không thể có được bất động sản 'aDataSort' không xác định hoặc null tham khảo
đây là mã
HTML
<table id="fp_promotion_history">
<thead>
<tr>
<th>AuditID</th>
<th>Action</th>
<th>Description</th>
<th>User Name</th>
<th>Audit Date</th>
</tr>
</thead>
<tbody>
<tmpl_loop name='fp_history'>
<tr id="AuditID_<tmpl_var name='AuditID'>">
<td data-AuditID="<tmpl_var name='AuditID'>"><tmpl_var name='AuditID'></td>
<td data-Action="<tmpl_var name='Action'>"><tmpl_var name='Action'></td>
<td data-Audit_Desc="<tmpl_var name='Audit_Desc'>"><tmpl_var name='Audit_Desc'></td>
<td data-User_Name="<tmpl_var name='User_Name'>"><tmpl_var name='User_Name'></td>
<td data-Audit_Date="<tmpl_var name='Audit_Date'>"><tmpl_var name='Audit_Date'></td>
</tr>
</tmpl_loop>
</tbody>
</table>
JQuery
showDialog({content:data,title:'Financial Promotion Audit Trail History (FPID : ' + $('#fp_promotions_table tr.selected').attr('id') + ')'});
// turn into a datatable
$('#fp_promotion_history').dataTable({
"sDom": 'R<"H"fr>t<"F"ip>',
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"iDisplayLength": 25,
"order": [[ 5, "desc" ]]
});
Điều tôi không hiểu là tôi đã có dữ liệu trên trang đang hoạt động tốt.
Tôi thực hiện cuộc gọi AJAX, hiển thị kết quả (bảng) với Hộp thoại giao diện người dùng JQuery, nhưng khi tôi cố gắng biến nó thành một DataTable, nó chỉ là lỗi?
Các tài liệu bao hàm nhiều bảng là OK: http://legacy.datatables.net/release-datatables/examples/basic_init/multiple_tables.html
Vì vậy, những gì tôi làm sai?
Cảm ơn, 1DMF
tuyệt vời rằng trong năm 2017 họ chưa sửa đổi điều này để một lỗi dễ đọc hơn được ném. – billynoah