Forum Moderators: coopster

Message Too Old, No Replies

open new window with PHP header

         

hermes

8:34 pm on Dec 20, 2004 (gmt 0)

10+ Year Member



Is there any way to open a new browser window with PHP? I know it can be done in javascript - but wondering whether it can be done with PHP. Much oblidged for any comment.

hermes

8:36 pm on Dec 20, 2004 (gmt 0)

10+ Year Member



Would be great if I could set the dimensions of this window using PHP as well.

coopster

8:37 pm on Dec 20, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, hermes.

Short answer? No.

But you could embed javascript in your PHP page that will do it for you with an "onload" action.

HughMungus

8:57 pm on Dec 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The way I do it is to use a "go" page (i.e., go.php?link=someurl), the link to which does open it in a new window then redirects the user to the new page based on what's in the "go" page.

hermes

2:17 pm on Dec 21, 2004 (gmt 0)

10+ Year Member



Thanks a lot humungus. Can you set the dimensions of this new page in php?

HughMungus

4:12 pm on Dec 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No. What I meant was that if you want a link to open in a new window, make your link look something like, "<A HREF="go.php?link=linktopageyou'resendingthemto" TARGET="_blank"> where the "go.php" page reads the $_POST value named "link" and redirects in that new window to the page you want to send them to. So, in other words, you're getting around the problem, not solving your particular problem.