Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scrolling

Status
Not open for further replies.

CuriousGeorge2

Technical User
Aug 5, 2002
27
US
I have a webpage that refreshes every 11 seconds. There is a lot of data on the page and to view different areas of the page you need to scroll down. Is there scripting that will keep the page at the area you scrolled down to when the page refreshes? Instead of having to scroll back down each time it refreshes?
 
Shouldn't be too hard to do:

1. Using the onunload event, save the values of document.body.scrollTop and document.body.scrollLeft to a cookie.

2. Using the onload event, read the values of the cookie.

3. Use the scrollTo() method to scroll to the previous location.

In ASP.NET this is built in. It's called "SmartNavigation". But there are some things to consider before using it. Look on google for more info.

Adam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top