Jump to content


Photo

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

dkmarsh99

    Newbie

  • New Members
  • Pip
  • 2 posts

Posted 30 March 2013 - 05:10 AM

Hi.

 

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

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com