• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Retreiving data on page scroll down event

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have developed an web application which display top blogs added by the user to that website.
I am displaying data in gridview. i have given pagination to gridview.
Now i want that "if i scroll down the page, then gridview automatically expands.
Ex: Initially it contains 10 records, when i scroll down page at bottom it should show me next 10(Total 20) record, again when i scroll down it should again show me next 10(Total 30) records without refreshing the page.
This is just like facebook, when you scroll down the page it automatically shows you older posts.


If anyone knows how to do this, Please reply...

Thanks,
 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can show a link at the bottom that says Show More, When you click on that link , fire an AJAX request and append the response to the existing div/gridview (I assume this is just a div).
Why do you want to do it on scroll down?
 
chathura chamida
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please someone help
 
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
as far as I am aware there is no scroll down event, there is just a big page and it lets you scroll down it. At the bottom of your facebook page is a link to show you older data.

Unless you implement your own scroll bar that is.

The only way to get more data without refreshing the page is ajax as the previous poster mentioned.


And you need to calm down and EaseUp, the people on here are doing it in their free time (or compile cycles) and being hassled or informed it is urgent is not going to make any difference.
 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, PatienceIsAVirtue.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is not something that JSP will be of much help with. You'll need to handle scroll events with JavaScript.
 
chathura chamida
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes i know i need ajax and java script but i have no idea how to use them should i call a java script function in on scroll method if it is so how i call that function at the end of scroll (when scroll reach to bottom of the page ) i need more explanation on this please some one help i am stuck
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay. Let's move this to the Javascript forum since that's what the question is about.
 
chathura chamida
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yeah
 
Wendy L Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
wellhow would you do it for a button press?
 
reply
    Bookmark Topic Watch Topic
  • New Topic