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 Quote Link to comment https://forums.phpfreaks.com/topic/254515-html-javascript-page-close-issue/ Share on other sites More sharing options...
Pikachu2000 Posted January 6, 2012 Share Posted January 6, 2012 That would be javascript, not php. Moving thread . . . Quote Link to comment https://forums.phpfreaks.com/topic/254515-html-javascript-page-close-issue/#findComment-1305055 Share on other sites More sharing options...
nogray Posted January 6, 2012 Share Posted January 6, 2012 You can try to add an onunload event in the pop up page. The main page and the pop-up page must be in the same domain. e.g. window.onunload = function(){ window.opener.location.reload(); } Quote Link to comment https://forums.phpfreaks.com/topic/254515-html-javascript-page-close-issue/#findComment-1305068 Share on other sites More sharing options...
houssam_ballout Posted January 6, 2012 Author Share Posted January 6, 2012 they are on the same domain, should I put the code in the popup? Note that the popup is like any other page.... thx Quote Link to comment https://forums.phpfreaks.com/topic/254515-html-javascript-page-close-issue/#findComment-1305071 Share on other sites More sharing options...
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.