Software Archive
Read-only legacy content
17061 Discussions

Scroll page to the top.

Nick_F_2
New Contributor III
230 Views

Hi Have a long form loaded from a menu on an initial screen. The form is longer than the screen. If the user scrolls the form, but then changes their mind and goes back to the first page menu then subsequently goes back to the form, the form page loads at the point they scrolled to previously, not the top of the form.

How do I ensure the form page displays from the top.

0 Kudos
1 Reply
Elroy_A_Intel
Employee
230 Views

I recommend trying the following method to scroll the page to the top:

window.scrollTo(0, 0);

For more information on scrollTo() visit http://www.w3schools.com/jsref/met_win_scrollto.asp.

0 Kudos
Reply