Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2012
    Thanked 0 Times in 0 Posts

    calljava script function at the end of scroll


    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...


  2. #2
    New Coder
    Join Date
    Jan 2010
    Thanked 13 Times in 13 Posts
    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:

    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 09:39 AM.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts