Posted: 12 Mar 2020 10:27 EDT Last activity: 16 Mar 2020 11:56 EDT
Page Scroll up when a button is clicked.
We have a requirement where users fill out a form and click a button at the end. On click of the button we are checking for field validation, and if there is any error we are displaying a message at the top of the page. However, the button that is clicked is located at the bottom pf the page and the page won't scroll up so that the user can see the error message displayed on top. How can we achieve this? I tried running a script window.scrollTop(0,0) but nothing happens. Please reply with any solution that you may have. Thank you.
***Edited by Moderator: Pallavi to update platform capability tags***