fonecave Posted December 7, 2007 Share Posted December 7, 2007 how do i open a new browser window with a http address? iv can do header(); but i want it to open in a new browser window.... probably simple but i dunno how? Quote Link to comment Share on other sites More sharing options...
robb73 Posted December 7, 2007 Share Posted December 7, 2007 you can use TARGET="_blank" in the <a> element, but you should note that it marked as deprecated by the W3C. take a look at: http://www.serve.com/apg/workshop/replacingTarget/ Rob Quote Link to comment Share on other sites More sharing options...
fonecave Posted December 7, 2007 Author Share Posted December 7, 2007 but how do i get it to open automatically i dont want a link if an if statement is true i want it to open Quote Link to comment Share on other sites More sharing options...
helraizer Posted December 7, 2007 Share Posted December 7, 2007 I guess you could possibly use an external javascript file to do it? <?php if ($if == "true") { //Your if statement here echo "<script type='text/javascript' src='/externalsource.js'></script>"; } else { //code for if the IF statement is false } ?> I haven't tested that but I would image it'd work. If the statement is true it'll launch that Javascript.. there is probably another way in PHP but that way /should/ work. Sam Quote Link to comment Share on other sites More sharing options...
fonecave Posted December 7, 2007 Author Share Posted December 7, 2007 have changed the code to submit into another php file which gives me a new clean page in the same frame! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.