File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Pagination style Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Pagination style" Watch "Pagination style" New topic

Pagination style

venkata swamymora
Ranch Hand

Joined: Aug 06, 2007
Posts: 33
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

Patricia Samuel
Ranch Hand

Joined: Sep 12, 2007
Posts: 300
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 .

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
You might also want to read
I agree. Here's the link:
subject: Pagination style
It's not a secret anymore!