dc_jt Posted October 14, 2008 Share Posted October 14, 2008 Ive tried searching for this but still cant seem to get my page to refresh. Here is my setup. Page 1 contains the following link: <a href="#" style="cursor:pointer" onclick="MM_openBrWindow('/cms/_content/documents/upload-document.inc.php?iDocumentId=<?=$_GET['iDocumentId']?>&iCategoryId=<?=$_GET['iCategoryId']?>','cardimg','width=800,height=300')">Upload Document</a> This opens page 2 as a popup window. In page 2 I have the following to close the popup: <a onclick="JavaScript:refreshParent()" href="#">Close</a> And also have the following javascript within page 2: <script language="JavaScript"> <!-- function refreshParent() { window.opener.location.href = window.opener.location.href; if (window.opener.progressWindow) { window.opener.progressWindow.close() } window.close(); } //--> </script> This closes the popup but doesnt refresh page 1, any ideas why?? Thanks Link to comment https://forums.phpfreaks.com/topic/128369-solved-auto-refresh-parent-page-when-close-popup/ Share on other sites More sharing options...
dc_jt Posted October 14, 2008 Author Share Posted October 14, 2008 Ive sorted it by using window.opener.document.location.reload(true); on the a tag when closing the popup. Link to comment https://forums.phpfreaks.com/topic/128369-solved-auto-refresh-parent-page-when-close-popup/#findComment-664990 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.