Datatable is not working after hosting on IIS

Datatable is not working after hosting on IIS

ashu81ashu81 Posts: 3Questions: 3Answers: 0
edited December 2020 in Free community support

Database could not be loaded after I published my application, though it works perfectly fine on Visual Studio IIS.

After publishing on IIS error DataTables warning: table id=myTable - Ajax error. For more information about this error, please see http://datatables.net/tn/7

$(document).ready(function () {
//jQuery DataTables initialization
$('#myTable').DataTable({
"processing": true, // for show processing bar
"serverSide": true, // for process on server side
"orderMulti": false, // for disable multi column order
"filter":true,
//"dom": '<"top"i>rt<"bottom"lp><"clear">',
"ajax": {
"url": "/AllowanceMaster/LoadData",
"type": "POST",
"datatype": "json"
},
"columns": [
//{ "data": "AId", "name": "AId", "autoWidth": true },//index 0
{ "data": "Name", "name": "Name", "autoWidth": true }, //index 1
{ "data": "Abbreviation", "name": "Abbreviation", "autoWidth": true }, //index 2
{ "data": "NameInPaySlip", "name": "NameInPaySlip", "autoWidth": true },//index 3
{
"data": "AId", "width": "50px", "render": function (data) {
return '<a class="popup" href="/AllowanceMaster/Edit/' + data + '">Edit</a>';
}
}
]
});
});

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    Have you gone through the diagnostic steps in the technical note referenced in the error message. That would be the place to start,

    Colin

  • chrisvell88chrisvell88 Posts: 10Questions: 1Answers: 0

    I have the same issue and getting the following error on jquery: DataTable is not a function. Can someone please assist urgently?

  • kthorngrenkthorngren Posts: 21,173Questions: 26Answers: 4,923

    @chrisvell88

    DataTable is not a function.

    Sounds like you haven't loaded the datatables.js files properly. Use the Download Builder to obtain the correct files.

    Kevin

This discussion has been closed.