Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

load new window

Status
Not open for further replies.

coderwasp

Programmer
Jan 10, 2007
24
US
i have this piece of code:

header('Location: feedbackPage.html');


It loads the next page. What I would like to do is load the page ina new window and close the current page. How would I do this?
 
you need to control this from the browser. in the relevant link or form tag include the attribute
Code:
target="_blank"

so a link would look like this
Code:
<a href="somepage.php" target="_blank">click me </a>

and a form tag
Code:
<form target="_blank" method="post" action="somepage.php" >
</form>
 
the problem is there is no link or form. This is a login page. As soon as the login is approved the browser needs to close this window and load a new window with the feedbackPage.html page.
 
Then you're stuck in the same window. PHP can't interact with the client. To close the browser window and open up a new one. That is Javascript territory. So you would have to redirect to the new page and have JS close the window and open a new one.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top