Jump to content


ajax refresh scrollable div - return to same scroll position

ajax scroll div refresh

  • Please log in to reply
No replies to this topic

#1 dkmarsh99

  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 30 March 2013 - 10:10 AM



I have a scollable div that is populated based on an ajax xmlhttp request. the div is


<div id="diarydetail" style="border-style: none; border-color: inherit; border-width: 0px; width: 794px; float: left; height: 580px; overflow: scroll;">


When I issue a new xmlhttp request to refresh the contents of the div - I want to position the scroll to the same place it was before the refresh was issues.


For example the div contains a diary page that scrolls through hours of the day. At any point in time you can see 3 hours - so what I want is that if I have scrolled through to 3pm on the page, then issue a refresh - the scroll will again position itself at 3pm.


Please help.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users