$_GET['iDisplayStart'] wrong on first paging with no cookie set
$_GET['iDisplayStart'] wrong on first paging with no cookie set
Hi,
ich have several datatables with serverside source and cookies. All work fine, except one. If there are no cookies set (because its the first usage og the table in a new browser) and I click on next page, I get a value of 100003689/42 for i$_GET['iDisplayStart'] / $_GET['iDisplayLength'] in my php datasource script, when I should get 11 / 20.
There is notihng special on the code.
[code]
toolTable=$('#toolTable').dataTable(
{
"sScrollY": $('#content').height()-74-26,
"sScrollX": $('#content').width(),
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "./datasource/ge_get_tool.php",
"bStateSave": true,
"iDisplayLength" : "10",
"fnCreatedRow": function( nRow, aData, iDataIndex )
{
var description=aData[2].replace(/\n/g, '
');
if(description.length)
{
$('td:eq(2)', nRow).html( description );
}
},
<?php include ($_SESSION['currentDir']."/ge_table_language.php"); ?>
});
[/code]
Do you have any idea where I can start to debug this?
Thanks
Claus
ich have several datatables with serverside source and cookies. All work fine, except one. If there are no cookies set (because its the first usage og the table in a new browser) and I click on next page, I get a value of 100003689/42 for i$_GET['iDisplayStart'] / $_GET['iDisplayLength'] in my php datasource script, when I should get 11 / 20.
There is notihng special on the code.
[code]
toolTable=$('#toolTable').dataTable(
{
"sScrollY": $('#content').height()-74-26,
"sScrollX": $('#content').width(),
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "./datasource/ge_get_tool.php",
"bStateSave": true,
"iDisplayLength" : "10",
"fnCreatedRow": function( nRow, aData, iDataIndex )
{
var description=aData[2].replace(/\n/g, '
');
if(description.length)
{
$('td:eq(2)', nRow).html( description );
}
},
<?php include ($_SESSION['currentDir']."/ge_table_language.php"); ?>
});
[/code]
Do you have any idea where I can start to debug this?
Thanks
Claus
This discussion has been closed.
Replies
After I once change the DisplayLength with the Select to an other value, everything works fine.
found out that it only happens when I set the inital iDisplayLength.
when I add
"aLengthMenu": [[5, 10, 15, 25, 50, 100 , -1], [5, 10, 15, 25, 50, 100, "All"]],
"iDisplayLength" : 10,
it works also. Seems as if it does not work with the LengthMenu defaults.