![]() |
| ||
| Scrollbar position on refresh problem Hello guys, can anyone offer guidance on how to implementthe following: I have a JSP page that automatically refreshes every minute. However the page is fairly long and when the user moves the scrollbar down the page, and the minute is up the JSP page is refreshed and the user is automatically taken back to the start of the page, not where they where before. I've found many examples whilst googl'n the internet but none which have really worked. I think I just need to get the X and Y co-ordinates of the vertical scroll bar... store them...refresh the page and load them back in Not sure if this function would be any use when loading them back in: window.scrollTo(X,Y); Thankyou |
| ||
| Re: Scrollbar position on refresh problem You'll have to get the scroll offsets and sent it to the server with every refresh, or you can store it in a cookie. Then when the refreshed window has loaded, scroll the window to the saved scroll offsets. Heres how to get the scroll offsets: function getScrollXY() {
ref: http://www.howtocreate.co.uk/tutoria.../browserwindowTo save stuff in cookies via javascript you can use; /**ref: http://www.dustindiaz.com/top-ten-javascript/ |
| All times are GMT -4. The time now is 9:14 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC