how to display Datatable Data Using Ajax Sourse Data in Java

how to display Datatable Data Using Ajax Sourse Data in Java

MuhammedMuhammed Posts: 2Questions: 0Answers: 0

function view(){

    var dataTable =  $('#example').DataTable(
    {
        processing: true,
        serverSide: true,        
        "deferRender": true, 
        "orderable": true,   
        "searchable": true,   
        "ajax":
        {
            "url": "index.htm",
            "type": 'POST',
            "data": function ( d )              
                    {
                         var JSONData = JSON.parse(d);
                        console.log(JSONData);
                         // fnCallback(d);
                    }

        },
        "columns":  [              
                        {"data": "Name"},
                        {"data": "Email"},
                        {"data": "Contact"}

                    ]

    });



     }

Replies

  • colincolin Posts: 8,085Questions: 0Answers: 1,357

    Can you post the JSON the server returns, it looks fine in the code.

    Colin

Sign In or Register to comment.