serverSide:true,
serverSide:true,
Hello all, I'm new to datatables, I'm getting a "RangeError: Maximum call stack size exceeded" error, i assumed this is because its loading 150000 records and it is very very slow loading, so on reading further I need to do server side processing I used serverSide:true, in the JS, but the page will not even load any data. am i doing something wrong? I'm sure i have the code right. can anyone help a newbie.
```(function($){
$(document).ready(function() {
var editor = new $.fn.dataTable.Editor( {
ajax: 'php/table.yayall_listings.php',
table: '#yayall_listings',
fields: [
{
"label": "name:",
"name": "name"
},
{
"label": "quantity:",
"name": "quantity"
},
{
"label": "buyout_price:",
"name": "buyout_price"
}
]
} );
var table = $('#yayall_listings').DataTable( {
serverSide: true,
ajax: 'php/table.yayall_listings.php',
columns: [
{
"data": "name"
},
{
"data": "quantity"
},
{
"data": "buyout_price"
}
],
select: true,
lengthChange: false,
} );
new $.fn.dataTable.Buttons( table, [
{ extend: "create", editor: editor },
{ extend: "edit", editor: editor },
{ extend: "remove", editor: editor }
] );
table.buttons().container()
.appendTo( $('.col-sm-6:eq(0)', table.table().container() ) );
} );
}(jQuery));
```
This question has an accepted answers - jump to answer
Answers
What is your server returning? Does it conform to DataTables' server-side processing requirements?
Allan
i can't get to see what the server is returning in inspector, it hangs up with no results it is there now with this code
var table = $('#yayall_listings').DataTable( {
serverSide: true,
ajax: 'php/table.yayall_listings.php',
columns: [
{
"data": "name"
},
{
"data": "quantity"
},
{
"data": "buyout_price"
}
],
select: true,
lengthChange: true,
deferRender: true,
scrollY: 740,
scroller: true
I've just tried the page you linked to and it appears to run okay. I'm not seeing any errors or hanging requests.
Allan
it because I have sorted it now, i didn't understand needed a extra php file for server side