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 Quote Link to comment 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> Quote Link to comment 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.