Colsole error with Ajax and Columns attribute

Colsole error with Ajax and Columns attribute

jvc123jvc123 Posts: 12Questions: 4Answers: 0
edited July 2022 in Free community support

I am using the code below in document.ready to try and load my object data with Ajax. Without the Columns attribute it hits my endpoint but with it I get the error in the console below and it does not hit my end point

$('#playerTable').DataTable({
ajax: 'player/index1',
columns: [
{ data: 'LastName' },
{ data: 'FirstName' },
],
});

http://localhost:1234/lib/datatables/dist/js/jquery.dataTables.min.js:108:349
each@http://localhost:1234/lib/jquery/jquery.js:367:19
each@http://localhost:1234/lib/jquery/jquery.js:202:17
http://localhost:1234/lib/datatables/dist/js/jquery.dataTables.min.js:108:305
each@http://localhost:1234/lib/jquery/jquery.js:367:19
each@http://localhost:1234/lib/jquery/jquery.js:202:17
u@http://localhost:1234/lib/datatables/dist/js/jquery.dataTables.min.js:101:187
l.fn.DataTable@http://localhost:1234/lib/datatables/dist/js/jquery.dataTables.min.js:191:482
http://localhost:1234/Player:19278:35
mightThrow@http://localhost:1234/lib/jquery/jquery.js:3557:29
http://localhost:1234/lib/jquery/jquery.js:3625:12
undefined jquery.js:3841:18
Uncaught TypeError: fa is undefined
jQuery 8
<anonymous> http://localhost:1234/Player:19278
jQuery 2
jquery.dataTables.min.js:108:349

Answers

Sign In or Register to comment.