Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

Scroll page to the top.

Nick_F_2
New Contributor III
414 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
414 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