We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Need Fix for Possible Problem with scrollTop in IE6

Medium Priority
574 Views
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:

document.getElementById('myDivThatScrolls').scrollTop=333;

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?
Comment
Watch Question

Epic ODBA
Commented:
do you need to specify '333px' and not just 333?

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.