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? Link to comment https://forums.phpfreaks.com/topic/80609-solved-open-new-browser/ 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 Link to comment https://forums.phpfreaks.com/topic/80609-solved-open-new-browser/#findComment-408758 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 Link to comment https://forums.phpfreaks.com/topic/80609-solved-open-new-browser/#findComment-409049 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 Link to comment https://forums.phpfreaks.com/topic/80609-solved-open-new-browser/#findComment-409060 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! Link to comment https://forums.phpfreaks.com/topic/80609-solved-open-new-browser/#findComment-409176 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.