Error: DataTables warning: table id=myTable - Ajax error. For more information about this error, ple

Error: DataTables warning: table id=myTable - Ajax error. For more information about this error, ple

Angel_03Angel_03 Posts: 1Questions: 0Answers: 0
edited June 2023 in Free community support

I was getting the error : DataTables warning: table id=myTable - Ajax error. For more information about this error, please see http://datatables.net/tn/7 like this i checked my complete code twisly then i finally

This is my code :

var dtable;
$(document).ready(function () {
    var dtable = $('#myTable').DataTable(
        {
            "ajax": {
                "url":"~/Admin/Product/AllProducts"
            },
            "columns": [
                { "data": "name" },
                { "data": 'description' },
                { "data": "price" }                         
            ]
        });
}); 

for retrive data through ajax it renders data

i changed

        "ajax": {
            "url": "../Admin/Product/AllProducts"
        }

try this code in your url : "../"

Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Replies

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

    Have you followed the steps in the technical notes linked to in the error? That'll be the place to start. If so, what did you find?

    Colin

Sign In or Register to comment.