Need Fix for Possible Problem with scrollTop in IE6

Posted on 2007-07-20
Last Modified: 2013-11-19
I'm creating an interface that needs to save the "scrollTop" position of a DIV. I have it working pretty well, it uses a combination of server-side scripting and javascript to remember where the user was scrolled to when they come back to the page.

Here's basic code I'm using in javascript:


My code is working in FireFox2, IE7, and Safari 3beta. The problem is, it doesn't work quite right in IE6.

Does anyone know if there is some kind of scrollTop problem/difference with IE6 that would make the values different? My code actually does scroll it, just not to the right position.

One more note... The scroll seems to want to scroll to a maximum position. So, it works up to a certain scroll position, but if I scroll any deeper it just stays in its "max scroll" position.

Any ideas?
Question by:cnxmax
    LVL 18

    Expert Comment

    LVL 17

    Accepted Solution

    do you need to specify '333px' and not just 333?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Shoutout to Emily Plummer ( for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
    JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now