You need to sign in to do that
Don't have an account?
Coco_Sdyney
Javascript refresh parent window from child not working in IE and Chrome
Hi,
I am made a button on contact page to open a VF page in new window, and wish to refresh the contact page when I click Submit in the VF page.
My VF page contains iframe, so I write javascript as below
function refreshparent()
{
top.window.opener.location.href= '/' + id;
}
on button:
<apex:commandButton action="{!Submit}" value="Submit" onComplete="refreshparent('{!Contact.Id}')"/>
This works find in Firefox, but not working in IE neither Google Chrome, any one has ideas to help me?
Thank you very much!!!
The way I access the parent page for a popup is:
This works for me across firefox, ie and chrome, though I'm hitting a javascript function embedded in a parent visualforce page rather than trying to change the location of the page.
Thanks Bob, I tried this piece of code but unfortunatly it not works for me, none of IE , Firefox or Chrome. :(
Have you checked for javascript errors? It might be that the browser is blocking the attempt as a cross site scripting attack.