Forum Moderators: coopster

Message Too Old, No Replies

Location Header Open in New Window

         

EricEC

5:15 am on Dec 7, 2008 (gmt 0)

10+ Year Member



Here is my situation...

I have a page called game.php.

The first line refers to a redirect.php page which will send a user to a different site if the game selected is in the redirect.php page.

The person is redirected by the header("Location... ") function.

My question is... is there a way to have this page, if the person is redirected, open up in a new page? I have read that you cannot do this with php so I believe I must use javascript or something of the like.

Is there a way to open a new page in my situation? And where would I add the javascript/script if there is?

Thanks,

Eric

coopster

7:00 pm on Dec 8, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Implement some javascript in the document to open a new window with the location of the redirect page when a "redirected" game is selected. You can put the <script> element anywhere in your HTML but most often it is included in either the <head> element or after the closing </body> tag.