By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,900 Members | 1,453 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,900 IT Pros & Developers. It's quick & easy.

save scroll position in cookie for postback

P: 3
I trying to make a javascript document reader in 2 frames.
The left frame displays the document, the right frame shows a list of document links.
This is as far as I got

http://www.geocities.com/viewdoq/opening.htm

(there are Firefox and Ie, and Ie version incompatiblities and clean-up which I will work on later)
Does anybody have one ready made?

I'd like to load the document and move the scroll position to where it was last viewed.
Can anyone suggest terms used to describe what i am trying to do, so I can search scripts?
The most relevant search results so far are "scroll position postback" but I haven't found any good scripts because there are so many issues regarding browser compatibility and ASP, PHP.

I was wondering if scroll position (scrollx, scrolly) captured by continually running timer driven sampler or some on condition, stored in a cookie would work?

Any suggestions?
Apr 8 '08 #1
Share this Question
Share on Google+
1 Reply


acoder
Expert Mod 15k+
P: 16,027
You could try saving the scrollTop property onbeforeunload and reset it from the cookie onload.
Apr 8 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.