save scroll position in cookie for postback

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wmbrae
    New Member
    • Apr 2008
    • 3

    save scroll position in cookie for postback

    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.c om/viewdoq/opening.htm

    (there are Firefox and Ie, and Ie version incompatiblitie s 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?
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    You could try saving the scrollTop property onbeforeunload and reset it from the cookie onload.

    Comment

    Working...