Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82536

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

$
0
0

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.


Viewing all articles
Browse latest Browse all 82536

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>