none
People search - infinite scroll for more items

    Question

  • Hi,

    I am building a People search page and have extended the CoreResultsWebPart to show all 5000 people (results) at one go. The result is pulled fast enough but I don't want to display all the data at one go because it shows an intimidatingly long scroll bar. All the data is retrieved at the start so no need of AJAX but I want only 5 or 10 results to be visible on load and then more should be shown only when user scrolls down. This looks like it is simple enough to be accomplished through some jquery/javascript in Content editor. Can anybody suggest me a solution for this?

    Regards,

    Sulabh


    Tuesday, July 24, 2012 10:07 AM

All replies

  • Any suggestions if this is possible?
    Thursday, July 26, 2012 2:48 PM
  • Hi,

    Did you find the solution for this.

    i am in need of the same requirement.


    Aruna

    Tuesday, December 31, 2013 12:28 PM
  • Aruna,

    I did achieve it using jquery but the performance as expected was poor. One needs to develop the entire search results web part again that would only send server requests for the required number of items when scrolled. The out of box wp would not work for this.


    Thursday, January 02, 2014 2:22 PM
  • HI Sulabh,

    can you provide me wit the jquery?

    and also the link to provide to develop the webpart.

    i need to talk with my client about the comparison of both so that they will decide the implementation part.


    Aruna

    Saturday, January 04, 2014 1:23 PM
  • Jquery can be found by googling around for infinite scrolling. For the web part, you're going to have to do that part. You need to inherit from the class SearchCoreResults.
    Saturday, January 04, 2014 1:29 PM
  • Hi,

    I googled around and got some scripts but i couldnt make it work.

    May be i miss something in the implementation.

    can you help me with that?


    Aruna

    Monday, January 06, 2014 7:20 AM
  • I have downloaded the js file from here

    https://github.com/pklauzinski/jscroll

    i created 2 text files and added to document lib and added 2 text file as content  links in CEWP.

    http://www.codeproject.com/Articles/544538/JQuery-with-SharePoint-2010 (referring this site)

    for simple function it works. but for infinite scroll its not:(

    My 2 text files are

    <html>
        <head>
            <script src="/Documents/jquery.infinitescroll.min.js" type="text/javascript"></script>
        </head>
    </html>

    Next:

      <html>
        <head>
            <script src="/Documents/jquery.infinitescroll.min.js" type="text/javascript"></script>
            <script type="text/javascript">

      $('.infinite-scroll').jscroll({


      alert("Hello World");   
    });

            </script>
        </head>
        <body>
        </body>
        </html>


    Aruna

    Monday, January 06, 2014 10:31 AM
  • Hi Sulabh,

    do you have a code sample to inherit from coreresultwebpart?


    Aruna

    Thursday, January 16, 2014 7:10 AM