I have a form to upload - after the user submits the form, I would like to scroll the window back to the top of the page (where I will show the help text). How to scroll the window to the top of the page?
To do this, you can use the scroll method for the window object:
window.scroll(0,0)
Arguments are a horizontal and vertical measure of scrolling in a window, so 0.0 returns it to the beginning.
Since you are using jQuery, you can try the ScrollTo plugin , which you can customize.
Can't you use the .focus () event for any tag at the top of the page?
$("input#myFirstName").focus();