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
madhu_ramadhu_ra 

Refreshing Entire Parent Page when popup closed

Hi Community, 

I have a VF page(contains only a table and a button) on my Opportunity layout and by clicking a button on that, I'm opening a popup(showModalDialog) window. I need to refresh the entire parent page which means the opportunity layout page(not only the VF page which opened the popup). 
What I tryied was, putting a hidden button on my detailed VF page and when the popup get closed, fire that button with,
        

 window.opener.location.href='/{!$CurrentPage.parameters.id}';

 


also tryied,
        

window.opener.location.reload();

 


Sometimes I'm getting "URL no longer existing" error on my detailed page when the popup get closed.
Actually I have not clear idea about how to work with this 3 level of pages. Please guide me on this.

 

Edited :

Ok, seemslike my question is not clear :) Can anyone let me know, how to reload the parent page, from a VF page which is inside the parent page(as a section in the layout)

 

Thanks,

Madhura

WannaKnowWannaKnow

Hello,

 

Did you try?

 

window.onunload = refreshParent;function

refreshParent()

{

  window.opener.location.reload();

}

 

If yes,then,

 

onunload="window.opener.location.reload();"

 

this?

 

 

Thanks,

Rocky