You need to sign in to do that
Don't have an account?
John Neilan 2
CommandButton Refresh Page
I have a VF page with a commandbutton. I am trying to get the page to refresh once the commandbutton is clicked. The code below does what it is supposed to do, but the page does not refresh. Does anyone know how I can do this?
<apex:commandButton action="{!approve}" oncomplete="window.opener.location.refresh();" styleClass="buttonStyle" style="background:#99C299; font-size:16pt; font-family:arial;" value="Submit for Final Approval"/>
oncomplete="window.opener.location.refresh();"
Let me know if you have any issues.
Thanks,
pRAMODH.
The key here is "reRender" property. This button will refresh the element with id="some_id". Try adding this ID to the element you want to refresh inside your page. If you want to refresh the whole page, try adding the ID to the top level element.
Let me know if it works?
OnClick will call the JavaScript code that will reload the whole page.