dlebowski Posted February 25, 2008 Share Posted February 25, 2008 I have a page that generates a popup using ONSUBMIT="openTarget In this new pop up page is some results with the ability to update them. Once I update them, I want the popup to automatically close and the parent page to refresh to a certain URL. I am currently using the below code and it works great with one exception. setTimeout("self.close();",2000) opener.location.reload(); Is there any way to make the parent window refresh to a different URL? For example if the parent page is originally "test.php?variable=1", after the pop up closes I want the page to be refreshed to "test.php". Thanks in advance. Ryan Link to comment https://forums.phpfreaks.com/topic/92935-parent-page-refresh-to-different-url/ Share on other sites More sharing options...
dlebowski Posted February 25, 2008 Author Share Posted February 25, 2008 I figured it out. Below is what I did. <script language="javascript"> <!-- setTimeout("self.close();",2000) window.opener.location = '<? echo "{$_SERVER['']}newpage.php" ?>'; //--> </script> Link to comment https://forums.phpfreaks.com/topic/92935-parent-page-refresh-to-different-url/#findComment-476191 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.