Jump to content

Open in new window and then run script in original window?


galvin

Recommended Posts

Just curious if this is doable with PHP...

 

I have a main page (we'll call it mainpage.php).  On that page, there is a link that opens "newwindow.php" in a new window.  There is a simple form on newwindow.php with an action of "mainpage.php". 

 

So when a user processes that form on newwindow.php, I want it to automatically CLOSE newwindow.php and essentially re-fresh mainpage.php in the original window (mainpage.php will have code to be run when the form from newwindow.php is submitted).

 

Is this possible?  (Right now it's just running mainpage.php in the "new window" so I then have two instances of mainpage.php open in two windows)

Yeah, saradrungta's would work if I wanted to do everything in the same window, but I NEED to open newwindow.php in a new window and then come back to the main window.  I tried having a TARGET of "_parent" in the form in newwindow.php, but it still does NOT go back to the main window. 

I was hoping that simple change would do it, but no dice, so it sounds like javascript is probably required, like you said.  Time to teach myself javascript :)

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.