You need to sign in to do that
Don't have an account?

Refresh Parent Window from Popup
I created a list button that opens a popup VF page which contains a form. After the form is saved, I want the popup to close and for the parent window to be refreshed. The refresh works great on FireFox and Chrome, but IE8 is somehow opening the parent window in a new window, instead of just refreshing the existing window. I've gone through various methods of opening a new window (window.showModalDialog, window.open, etc) and have settled on window.open() in my list button. I also found a great piece of code on the forum that returns values from my controller, closes my pop up and refreshes the parent window.
Why is IE8 opening a new window instead of just refreshing the existing one?
List button javascript:
window.open('/apex/quickCreateProduction?id={!Contact.Id}',"window","width=460, height=375");
Javascript in VF page (popup):
<script language="javascript" type="text/javascript"> if("{!$Request.success}" == "true") { parent.window.close(); parent.window.opener.location.href = "/{!$Request.id}"; } </script>
Save in custom controller (after success):
PageReference curPage = ApexPages.currentPage(); curPage.getParameters().put('success','true'); curPage.getParameters().put('id',Apexpages.currentPage().getParameters().get('id')); curPage.setRedirect(true); return curPage;
I could definitely use some help. Thanks in advance.
Adriel
Thank you everyone for your help. I got tired with the issues in IE8 and after speaking with my BA we settled for a manual refresh on the parent:
Thanks again.
All Answers
Hi, i have the same problem with IE8.
Any solution??
thanks
greetings
Nothing yet, but I'll post it when I do.
Adriel
Hi,
If you want to reload the same page try this code :
You can use :
window.parent.parent.window.opener.location.href = "/{!$Request.id}";
or
Parent Page: <input onclick="ppppp();" />
<script>
function ppppp()
{
var acid = document.getElementById('xyz').value;
fetchdata1(acid);
}
</script>
Note : fetchdata1 is an actionfunction.
In popup page :
window.parent.parent.opener.document.getElementById('xyz').onclick();
Hope this helps.
I try with:
window.parent.parent.window.opener.location.href = "/{!$Request.id}";
with IE8 open a new windows :smileysad:
Thank you everyone for your help. I got tired with the issues in IE8 and after speaking with my BA we settled for a manual refresh on the parent:
Thanks again.
Thanks, this worked perfectly!