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

Next putton in pagination is not taking user past page 2

$
0
0

Hello. I've upgraded to DataTables-1.10.4. I noticed Next button for pagination for my AJAX tables was not working. My pagination is setup for 50 records per page. When I clicked the Next button on page 1, the 'Showing ...' message was changed to:

Showing 0,501 to 173 of 173 entries

Subsequent click of Next button would not do anything. All other buttons for pagination seem to work.

I tracked the issue to _fnPageChange method of jquery.dataTables.js (roughly line 3471). This is the original code:

    var
        start     = settings._iDisplayStart,
        len       = settings._iDisplayLength,
        records   = settings.fnRecordsDisplay();

I changed it to:

    var
        start     = parseInt(settings._iDisplayStart),
        len       = parseInt(settings._iDisplayLength),
        records   = settings.fnRecordsDisplay();

After adding parseInt() for start and len, the Next button pagination works.

Hopfully this will help someone else.

Thanks

Tom


Viewing all articles
Browse latest Browse all 82462

Trending Articles



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