You need to sign in to do that
Don't have an account?
John Neilan 2
How to Refresh Current Window on Button Click?
I have the code below as a button in a VF page. When clicked, a new tab opens up with the same page. How can I prevent a new tab from being opened in the browser and just refresh the page where the user clicked the button? I tried adding "_parent" and "_self" to the onclick code, but it didn't do anything. Thanks.
<button class="btn" style="background:#99C299; height:35px; width:250px;" onclick="javascript:window.open('/p/process/Submit?id={!DS.Id}&retURL=%2F{!DS.Id}');"> <b>Submit For Approval</b> </button>
Thanks!
All Answers
Use this.
onclick="javascript:window.open('/p/process/Submit?id={!DS.Id}&retURL=%2F{!DS.Id}', '_top');">
Mark solution if works.
Thanks
Jai
window.location.reload();
window.location.reload();
Not javascript:window.location.reload('/p/process/Submit?id={!DS.Id}&retURL=%2F{!DS.Id}','_top');
Dont give parameter value for this.
Thanks!