Jump to content

ajax refresh scrollable div - return to same scroll position


dkmarsh99

Recommended Posts

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.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.