function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jnegijnegi 

How to refresh parent window from the pop-up window?

Hi All,

I am trying to refresh the parent window with the click of a button, which is on pop-up window, with the help of below code:
VF code:-

<script>
if("{!$Request.success}" == "true") {
parent.window.close();
parent.window.opener.location.href = "/{!$Request.id}";
}
</script>

Controller:-
PageReference curPage = ApexPages.currentPage();
curPage.getParameters().put('success','true');
curPage.getParameters().put('id',Apexpages.currentPage().getParameters().get('id'));
curPage.setRedirect(true);
return curPage;

 

This code is working fine in Chrome and Mozilla. However, in IE8, when I click on the button, it is opening a new window
rather than refreshing the parent window.

 

Any suggestion would be appreciated.

Chamil MadusankaChamil Madusanka

Try folowing solution

boards.developerforce.com/t5/Visualforce-Development/Refresh-Parent-Window-from-Popup/m-p/200917/highlight/true#M27309

 

If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

jnegijnegi

Thanks Chamil for your response.

 

But that link doesn't resolve my issue. That is just a work around to show the message to refresh the page manually.

 

Thanks