Scroller not scrolling (using server side processing)

Scroller not scrolling (using server side processing)

BrixtonBikerBrixtonBiker Posts: 2Questions: 0Answers: 0
edited January 2012 in General
I'm using php to pull data from a mysql table, using the sample code found on the Examples page.
I get the first 10 rows showing - that's all. No scrollbar. If I click a header or enter something into the search field then the server is polled again and the data refreshed, but I can't scroll down.
The table footer accurately says "showing 1-10 of 57,970 entries" but I can't scroll.
I've tried a variety of combinations, including infinite scrolling and using the scroller plugin, but I can't get it to work. Rather baffled!
The table initialisation code is here:
[code]
$(document).ready(function() {
$('#example').dataTable( {
"bScrollInfinite": true,
"sScrollY": "800px",
"bServerSide": true,
"sAjaxSource": "DataTables/responder.php",
"sDom": "frtiS",
"aoColumnDefs": [
{ "sType": "date", "aTargets": [ 1 ] }
]
} );
} );
[/code]

and the php is exactly the same as it is on the example page (http://datatables.net/release-datatables/examples/server_side/server_side.html) but with my own column definition for my table.

Any ideas?
Thanks

Replies

  • BrixtonBikerBrixtonBiker Posts: 2Questions: 0Answers: 0
    Ahem, solved my own problem.
    The Scroller page at http://datatables.net/extras/scroller/ says [quote] Scroller is initialised by simply including the letter 'S' in the sDom for the table you want to have this feature enabled on. Note that the 'S' must come after the 't' parameter in sDom. [/quote] whereas in fact that's not *quite* true.
    You also need to add the Scroller JS to the document header!
    *sigh*
    I had a very bad night's sleep last night, I'm going to put this masterful display of stupidity down to that.
    (Although it may be wise to slightly re-visit the documentation!)
This discussion has been closed.