houssam_ballout 2 Posted January 6, 2012 Report Share Posted January 6, 2012 Hello,I had a normal page which contains some link that will issue a popup window. I want to refresh the main page when the pop page being closed, any help?Thanks in advance Quote Link to post Share on other sites
justsomeguy 1,135 Posted January 6, 2012 Report Share Posted January 6, 2012 You can use the onclose event to run a function to refresh the parent. You can get a reference to the parent using window.opener, which is only available to windows that were opened by another page. Quote Link to post Share on other sites
houssam_ballout 2 Posted January 11, 2012 Author Report Share Posted January 11, 2012 Is there any example?thx Quote Link to post Share on other sites
justsomeguy 1,135 Posted January 11, 2012 Report Share Posted January 11, 2012 I'm sure you can find examples of using the onclose event. There's nothing special about using window.opener, it's a replacement for using the window object when you're working with a different page. If you want to run an alert on the parent window, then instead of using alert or window.alert you would use window.opener.alert. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.