How to load/reload data using VUEJS or an AJAX equivalent

How to load/reload data using VUEJS or an AJAX equivalent

mflaviusmflavius Posts: 1Questions: 1Answers: 0
edited September 2016 in Free community support

How do i get data from a php page using datatables? im posting the data using vuejs but i can use plain ajax as well its not an issue this is my code so far. (im using laravel)

$('#table').DataTable({
                        "aoColumns": [
                            { "bSortable": false },
                            { "bSortable": true },
                            { "bSortable": true },
                            { "bSortable": true },
                            { "bSortable": true },
                            { "bSortable": true }
                        ],
                        "columnDefs": [
                            { "type": "date", "targets": 5 },
                            { "width": "30%", "targets": 0 },
                            { "width": "10%", "targets": 1 },
                            { "width": "20%", "targets": 2 },
                            { "width": "10%", "targets": 3 },
                            { "width": "10%", "targets": 4 },
                            { "width": "10%", "targets": 5 }
                        ],
                        ajax: {
                            "url": "/profitloss/getLogData",
                            "type": "GET",
                            "dataSrc": "tableData"
                        }
                    }).draw();

Right now nothing is happening only in the console it displays Uncaught TypeError: Cannot read property 'length' of undefined im not sure if this is related but i would liek to find a solution to this problem, any help apreciated.

This discussion has been closed.