Jump to Page?

Jump to Page?

robbie.bprobbie.bp Posts: 4Questions: 0Answers: 0
edited April 2011 in General
I cannot figure out a way to add a feature to allow a user to enter in a page number and jump to that page.

It there are 100 pages it only shows 5 to click on.

I need to be able to enter in 34 and have it jump right to that page.

is this possible to add in?

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,473 Site admin
    Perhaps this pagination plug-in will do what you want: http://datatables.net/plug-ins/pagination#text_input . Otherwise there is this API plug-in: http://datatables.net/plug-ins/api#fnDisplayStart .

    Allan
  • robbie.bprobbie.bp Posts: 4Questions: 0Answers: 0
    This is perfect!

    How do I implement it though?
  • allanallan Posts: 63,516Questions: 1Answers: 10,473 Site admin
    http://datatables.net/plug-ins/pagination#how_to
    http://datatables.net/examples/plug-ins/paging_plugin.html

    Allan
  • robbie.bprobbie.bp Posts: 4Questions: 0Answers: 0
    I saw those and I added the input js file to my server and linked to it and added the Doc. ready.

    when I open the page I get an error can not re-initialize and something about check API
  • allanallan Posts: 63,516Questions: 1Answers: 10,473 Site admin
    As the error says, you can't reinitialise a table (without first destroying it). If you get this error it means you have two calls to $().dataTable() for your table. You need to either combine them or remove the redundant one.

    Allan
  • robbie.bprobbie.bp Posts: 4Questions: 0Answers: 0
    awesome thanks got it working
This discussion has been closed.