This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

next and previous options  RSS feed

 
kartheek vvk
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi To every One,

I am developing one portal in that i had a problem please help me,
the problem is,

there is option for search by name, by giving name i am able to get results suppose if the result contains 10 results
1,2,3,4,5,6,7,8,9,10 on the resulting page if suppose to click on one result suppose i clicked on 2 the 2nd page have to open with previous and next option if i click on next it have to open the 3rd page or if i click previous option 1st page have to open. this is my problem please help me..
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66144
143
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See the JspFaq where there is an entry that discusses pagination strategies.
 
sri ramvaithiyanathan
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi kartheek,

Welcome to coderanch.
Value is coming in order only right "say for example 1,2,3,4...", so while clicking some value you need to pass the rowcount value, for that row count you can easily find previous and next is present or not.
Else pass the unique id for selected input(for example I click on 2, it may have some id) pass it and check whether previous and next present using your database query.

Hope it may help you.

Regards,
Sriram.V
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!