Header Location in new window?

Reply

Join Date: Dec 2004
Posts: 38
Reputation: mindfrost82 is an unknown quantity at this point 
Solved Threads: 0
mindfrost82 mindfrost82 is offline Offline
Light Poster

Header Location in new window?

 
0
  #1
Nov 10th, 2006
I have the following part of code in a PHP file and I want to know if there's a way to make the URL open in a new window instead of the same window. It might be a dumb or easy question, but I'm not too familiar with PHP

  1. header("Location: http://www.website.com" );

Let me know if this is possible, and if so, how. Thanks.
Last edited by mindfrost82; Nov 10th, 2006 at 10:57 pm.
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 1,422
Reputation: stymiee is on a distinguished road 
Solved Threads: 35
Moderator
stymiee's Avatar
stymiee stymiee is offline Offline
He's No Good To Me Dead

Re: Header Location in new window?

 
0
  #2
Nov 10th, 2006
Can't do that with PHP. You'll need JavaScript for that.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 38
Reputation: mindfrost82 is an unknown quantity at this point 
Solved Threads: 0
mindfrost82 mindfrost82 is offline Offline
Light Poster

Re: Header Location in new window?

 
0
  #3
Nov 10th, 2006
Originally Posted by stymiee View Post
Can't do that with PHP. You'll need JavaScript for that.
How could I do it with javascript?
Reply With Quote Quick reply to this message  
Join Date: May 2006
Posts: 1,422
Reputation: stymiee is on a distinguished road 
Solved Threads: 35
Moderator
stymiee's Avatar
stymiee stymiee is offline Offline
He's No Good To Me Dead

Re: Header Location in new window?

 
0
  #4
Nov 11th, 2006
Well, if you have to communicate with a server-side script you will need to use ajax to have the server do that work and then return whether or not it was successful or not. If it was successful just use window.open() to open a new window.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC