0

I'm not really sure how to word this question, but here goes.

I have a web page that displays (potentially) a large graphic that is updated every second or so on a timer refresh. The graphic is inside an updatepanel that refreshes on the timer tick.

A user is reporting annoyance with the fact that everytime the image refreshes, the page is reset to the top - i.e. his scroll position is lost. He doesn't want to zoom out of the image so that he can see the desired area since detail would be too small to make out.

Is there anyway (if at all) that when the page refreshes, it maintains the same scroll position? I've tried experimenting with Chrome, IE, firefox and all seem to behave differently. For example, chrome sometimes repositions the page at the top but more often leaves the page position alone; firefox always resets the scroll position and IE resets the page position to the top more often than not.

Sorry, but I'm not very experienced in ASP.NET, let alone Javascript, so I'm not even sure it's possible to achieve what I want. Thanks anyway.

Muckers Mate
  • 399
  • 8
  • 23
  • I found a solution here (but does not work with Firefox) [Prevent scroll position reset](http://stackoverflow.com/questions/5151656/how-to-avoid-updatepanel-scrolling-on-autopostback?lq=1) – Muckers Mate Nov 04 '15 at 16:17

1 Answers1

0

You should be able to access the scrollbar positions and manipulate them, if not on the page then definitely on the container, in which case you could store the current position and set it to the stored value as required. Try looking for scroll event handling. Sorry I don't know offhand how to do this but hopefully that gives you something more to go by.

Ciara
  • 384
  • 2
  • 12