Go Back   CodingForums.com > :: Client side development > JavaScript programming > Ajax and Design

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-05-2012, 10:12 PM   PM User | #1
chathura
New to the CF scene

 
Join Date: Apr 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
chathura is an unknown quantity at this point
calljava script function at the end of scroll

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.

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 that javascript function please some one help i am stuck

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

Thanks,
chathura is offline   Reply With Quote
Old 04-11-2012, 08:35 AM   PM User | #2
hey
New Coder

 
Join Date: Jan 2010
Posts: 38
Thanks: 0
Thanked 13 Times in 13 Posts
hey is an unknown quantity at this point
Are you using a library like jQuery? This is something you'll have to reference, and you'll have to test it out on multiple browsers if you're not using a library. Look up information about "scroll events". For example:

Code:
window.onscroll = function(){ /* code here */ };
If you don't know how to create event handlers and such, then you can use a library like jQuery that makes things easier.

Last edited by hey; 04-11-2012 at 08:39 AM..
hey is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:09 PM.


Advertisement
Log in to turn off these ads.