View Full Version : Form submit button that is also an anchor link?

05-24-2012, 08:36 PM
So I have a form for a mailing list, addes an eMail to a database ect...

Although it's down a bit on the page, when the user clicks submit it jumps them to the top of the page. This is a bit of a problem because incase there is an error or it worked they would have to scroll back down to see it/ the message.

Is there anyway to detect where the user's vertical location is on the page and when they click submit reaload the page to that same location, or can I use that form submit button to also go to an anchor location?

05-25-2012, 04:18 AM
<form action="#f" id="f">

and then when you press submit the current page reloads at the top of the form.