Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7628761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:39:22+00:00 2026-05-31T05:39:22+00:00

MaintainScrollPositionOnPostback = true its working with IE but not with mozilla(version 9) suggest another

  • 0

MaintainScrollPositionOnPostback = true

its working with IE but not with mozilla(version 9)

suggest another way of maintaining scroll position that is browser independent..

thanxx

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T05:39:23+00:00Added an answer on May 31, 2026 at 5:39 am

    Found the answer here:

    http://weblogs.asp.net/andrewfrederick/archive/2008/03/04/maintain-scroll-position-after-asynchronous-postback.aspx

    and here:

    https://web.archive.org/web/20211020140248/https://www.4guysfromrolla.com/articles/111704-1.aspx

    Let me know if it works out for you!


    EDIT

    Since I just had link answers I am actually just going to paste the code snippets here in case those links disappear:

    From http://weblogs.asp.net/andrewfrederick/archive/2008/03/04/maintain-scroll-position-after-asynchronous-postback.aspx:

    <script type="text/javascript">
        var xPos, yPos;
        var prm = Sys.WebForms.PageRequestManager.getInstance();
        prm.add_beginRequest(BeginRequestHandler);
        prm.add_endRequest(EndRequestHandler);
        function BeginRequestHandler(sender, args) {
            xPos = $get('scrollDiv').scrollLeft;
            yPos = $get('scrollDiv').scrollTop;
        }
        function EndRequestHandler(sender, args) {
            $get('scrollDiv').scrollLeft = xPos;
            $get('scrollDiv').scrollTop = yPos;
        }
    </script>
    

    From: https://web.archive.org/web/20211020140248/https://www.4guysfromrolla.com/articles/111704-1.aspx

    <script language = "javascript">
    
        function sstchur_SmartScroller_GetCoords()
        {
            var scrollX, scrollY;
    
            if (document.all)
            {
                if (!document.documentElement.scrollLeft)
                    scrollX = document.body.scrollLeft;
                else
                    scrollX = document.documentElement.scrollLeft;
    
                if (!document.documentElement.scrollTop)
                    scrollY = document.body.scrollTop;
                else
                    scrollY = document.documentElement.scrollTop;
            }   
            else
            {
                scrollX = window.pageXOffset;
                scrollY = window.pageYOffset;
            }
    
            document.forms[formID].xCoordHolder.value = scrollX;
            document.forms[formID].yCoordHolder.value = scrollY;
        }
    
        function sstchur_SmartScroller_Scroll()
        {
            var x = document.forms[formID].xCoordHolder.value;
            var y = document.formsformID].yCoordHolder.value;
            window.scrollTo(x, y);
        }
    
        window.onload = sstchur_SmartScroller_Scroll;
        window.onscroll = sstchur_SmartScroller_GetCoords;
        window.onkeypress = sstchur_SmartScroller_GetCoords;
        window.onclick = sstchur_SmartScroller_GetCoords;
    
    <script>
    

    All the credit to the guys that worked hard on these answers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an issue with maintaining scroll position. I am almost positive that I
I was wondering if there was a way to easily maintain scroll position using
Is there a way to maintain scroll position after a postback in visual studio
Cut a short story even shorter, Have a asp.net page with MaintainScrollPositionOnPostback=true in the
Is there any easy way to save users position on the site after postback
How do I maintain the scroll position on a postback in ASP.NET MVC? The
I want to maintain the Scroll Position between two pages. I have a Page
Back with another web based issue. When a control issues a postback to the
I need to scroll to the top of the page after an Async Postback
I getting issue with MaintainScrollPositionOnPostback with UpdataPanel in TestPage.aspx page. Page Header : <%@

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.