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
NHKNHK 

Refresh Parent window once popup is closed

Hi All,
I am opening a VF page as popup from a standard home page. I am opening this popup from custom link of type on click javascript. I need to refresh parent window once the popup is closed. I tried accessing window.opener, window.opener.closed in popup page but it is returning NULL. Please let me know how can we refresh parent window(which is not a VF page).

Thanks,
NHK
Raghavan KumarRaghavan Kumar
Hi NHK,

You can achieve that using the below java script code.

var rel = window.opener.location; --- get the parent window location.
window.close(); close current pop up page.
rel.reload(); reload the parent page.

Thanks,
Raghavan K.
 
Ashish_Sharma_DEVSFDCAshish_Sharma_DEVSFDC
Hi,
Try below script.
<script language="JavaScript" type="text/javascript">
       function refreshParentWindow(){
           window.opener.location.href="/{!$CurrentPage.parameters.id}";
           window.top.close();
       }
   </script>
Let us know if it helps you.