[SalesForce] Close child window and redirect parent window..

I am opening a POPup window..which i am opening a VF page onlclick of a custom button.I Want to close the child window and redirect the parent window to email author page with some parameters/

https://cs16.salesforce.com/_ui/core/email/author/EmailAuthor?doc_id=00Pf0000000x1HuEAI&p3_lkid=006f0000004fKcj

I know how to close the child window but can someone tell me to redirect the parent window

 function myClose(){

    self.close();
    window.opener.location.href="/{!$CurrentPage.parameters.Id}";

    //you could also use self.close();    
    }

I would really appreciate.

Thanks

Best Answer

Try the below code

function myClose(){
   self.close();
   window.parent.location.href="/_ui/core/email/author/EmailAuthor?doc_id=00Pf0000000x1HuEAI&p3_lkid=006f0000004fKcj";
}
Related Topic