Scroll to top of page on back, or link selected - SharePoint Designer 2007


  • Hi

    I have a SharePoint page which shows a reporting services report via a page viewer web part.

    How can I force the page to always scroll to the top when it loads or when a user clicks back, or clicks a link in the report to open another report.

    Generally I don't want the page to maintain its position at all, it should always scroll to the top of the page when it loads, or when the user clicks back.

    (I'm using SharePoint 2007)

    Any suggestions would be much appreciated!


    Please note I have also posted this question in the SharePoint customization forum as I'm not sure what the best place for this thread is.

    Monday, July 26, 2010 10:21 AM


  • Hi,

    It seems that the page is influenced by some javascript code.

    You can take the following steps to implement the function.

    1. Download the JQuery file from here and the scrollTo.js plugin from here

    2.Copy the files jquery-1.4.1.js and jquery.scrollTo.js to the C:/Program Files/Common Files/Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS.

    3. Open the page you want to edit with Microsoft Office Sharepoint Designer.

    4. Add the following code to the page in body section. Sometimes you have to check the master file to see which ContentPlaceHolder control is placed in body. Then you can add the following code to relevant Content control.

    <script type="text/javascript" src="/_layouts/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="/_layouts/jquery.scrollTo.js"></script>
    <script type="text/javascript" language="javascript">
    5. Finally congratuation you that it's done.
    Microsoft Online Community Support
    • Marked as answer by Wayne Fan Friday, July 30, 2010 6:35 AM
    Wednesday, July 28, 2010 8:39 AM