+ Start a Discussion
SahilSFSahilSF 

Refreshing parent window.

Hi,

 

We have a custom button on Standard Account page. On click of that button we are showing user a visualforce page in a pop-up window. We have a javascript code written in that vf page which will close the popup window and refreshes the parent window. This is working fine on firefox but in IE8 instead of refreshing the parent window it is opening a new window.

 

function refresh(accID)
{
   var parent= window.opener;
   parent.location.href='/'+accID;
   window.close();
   return true;
}

 

accID-> is the accountid  selected by the user in popup window.

 

Any suggestions.

SFDC_LearnerSFDC_Learner

Try this :

It may helps you.

<apex:commandButton value="Send Email" action="{!send}" oncomplete="self.close();"/>



SahilSFSahilSF

This will not work. This will simply refresh the popup window instead of closing it and refreshing the parent window.

iBr0theriBr0ther

IE does not allow CrossDomain browsing. You may open new vf page instead of popup. This is the best solution.

DewdropFreshDewdropFresh

This was a great suggestion! Thanks!