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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

move down the page using OnLoad()

Status
Not open for further replies.

wjl11

IS-IT--Management
Jun 20, 2002
34
US
Hello,
I have a database navigation page that allows 'next n' and 'prev n' navigation. When the user goes to 'next n' the page is reloaded with the new data, but the info is not on the initial display because it is near the bottom.
Is there a way to use the OnLoad() function to get the page to go a specific place after its loaded?
Thanks,
Will
 
yes:

for an absolute position:
window.scrollTo(x,y);

or for a relative position:
window.scrollBy(x,y);

x and y are pixels. =========================================================
while (!succeed) try();
-jeff
 
Thanks!
Is there any chance that the browser knows where it was on the previous page, and that I can use a function to get there? IE: window.ScrollTo(whereever you were before)?
 
I don't know if this will work, but what you can try doing is I assume there is a link to get user to next n. You can put a <span id=pos> around the link and when the page is loaded do a focus() to that id. Good Luck.
Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top