houssam_ballout Posted January 6, 2012 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 Link to comment Share on other sites More sharing options...
justsomeguy Posted January 6, 2012 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. Link to comment Share on other sites More sharing options...
houssam_ballout Posted January 11, 2012 Author Share Posted January 11, 2012 Is there any example?thx Link to comment Share on other sites More sharing options...
justsomeguy Posted January 11, 2012 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.