+ Start a Discussion

Scroll down automatically after vf page refresh to a perticular section

Hi I have lengthy custom form, wher user can upload some docs,when he uploads the vf pafe refreshes and shows the list of docs uploaded and the statuses in different section changes.


but when the user submits, the page gets refreshed it gng to the top of the page , but i want that to scroll down to the section wher he is wrking automatically.


i found the snippet of java script function which works fine on page load, but i want it to happen conditionally


function Scrolldown() {
window.onload = Scrolldown;


below is my command button


 <apex:commandButton value="  Submit  " action="{!docSubmit}" onclick="return confirmSubmit()" />


i added the oncomplete to my button and called the js function it didnt work.


I am kind of struck now.