Scroller and bStateSave doesn't work with server side processing
Scroller and bStateSave doesn't work with server side processing
Hi forum,
When using save state with Scroller server processing, the scrollbar doesn't go to the last position by itself. Im using jquery ui tabs. When i jump between tabs containing different tables, the scroll position is at the top and no data is being loaded, it's just standing there. Then I move the slider manually a bit and it jumps to the correct position.
btw, state save works fine when I'm not using server side processing, also server side processing works fine without state save.
[code]
$('#tabs').tabs({
cookie: { expires: 30 },
load: function(event,ui)
{
if (ui.index==1)
{
var table= "tablename";
$('#'+table).dataTable({
"bScrollCollapse": true,
"sAjaxSource": "server_processing.php",
"bServerSide": true,
"aaSorting": [ [0,'desc']],
"oScroller": {
"loadingIndicator": true
},
"sDom": '<"H"Cfr>tS<"F"i>',
"sScrollX":$(window).width()-250,
"sScrollY":$(window).height()-260,
"bJQueryUI": true,
"bStateSave": true,
"bDeferRender": true
});
...
[/code]
the server returns correct data
[code]
{"sEcho":1,"iTotalRecords":"1012","iTotalDisplayRecords":"1012","aaData":[["...
[/code]
just for some reason it waits for manual input to display data and position slider correctly.
When using save state with Scroller server processing, the scrollbar doesn't go to the last position by itself. Im using jquery ui tabs. When i jump between tabs containing different tables, the scroll position is at the top and no data is being loaded, it's just standing there. Then I move the slider manually a bit and it jumps to the correct position.
btw, state save works fine when I'm not using server side processing, also server side processing works fine without state save.
[code]
$('#tabs').tabs({
cookie: { expires: 30 },
load: function(event,ui)
{
if (ui.index==1)
{
var table= "tablename";
$('#'+table).dataTable({
"bScrollCollapse": true,
"sAjaxSource": "server_processing.php",
"bServerSide": true,
"aaSorting": [ [0,'desc']],
"oScroller": {
"loadingIndicator": true
},
"sDom": '<"H"Cfr>tS<"F"i>',
"sScrollX":$(window).width()-250,
"sScrollY":$(window).height()-260,
"bJQueryUI": true,
"bStateSave": true,
"bDeferRender": true
});
...
[/code]
the server returns correct data
[code]
{"sEcho":1,"iTotalRecords":"1012","iTotalDisplayRecords":"1012","aaData":[["...
[/code]
just for some reason it waits for manual input to display data and position slider correctly.
This discussion has been closed.