This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Pagination style  RSS feed

 
venkata swamymora
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I want a javascript code for pagination (or) navigate the records which is retrived from the database

my target shown below:

< << 1|2|3|4|5 >> >

Please help me regarding this

venkat
 
Patricia Samuel
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to use rownum in your query that will fetch records like this
rownum>=lowerlimit and rownum<=upperlimit

just calculate lowerlimit = (pageno-1)*no_of_records_per_page
and upperlimit = pageno * no of records_per_page;
where no_of_records_per page is the number of recoreds you wish to show on a page.

send selected pageno <1|2|3> to action.

See if it helps .

Thanks
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might also want to read http://faq.javaranch.com/java/PaginationOrPaging
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!