ahs10 Posted April 28, 2007 Share Posted April 28, 2007 how do i make the following line load in new window? header('Location: '.$url.''); thanks in advance for any help! Quote Link to comment https://forums.phpfreaks.com/topic/49023-solved-header-location-variable-load-in-new-window/ Share on other sites More sharing options...
MadTechie Posted April 28, 2007 Share Posted April 28, 2007 you don't use javascript Quote Link to comment https://forums.phpfreaks.com/topic/49023-solved-header-location-variable-load-in-new-window/#findComment-240160 Share on other sites More sharing options...
ahs10 Posted April 28, 2007 Author Share Posted April 28, 2007 ok. so how would i use javascript to load a new window for this php variable? Quote Link to comment https://forums.phpfreaks.com/topic/49023-solved-header-location-variable-load-in-new-window/#findComment-240162 Share on other sites More sharing options...
MadTechie Posted April 28, 2007 Share Posted April 28, 2007 just echo the javascript, javascript is parsed as the screen loads and php generates the output so <?php $loc = "http://www.phpfreaks.com"; echo "<script LANGUAGE='JavaScript'>"; echo "self.opener.location = $loc;"; echo "</script>"; ?> should work ok Quote Link to comment https://forums.phpfreaks.com/topic/49023-solved-header-location-variable-load-in-new-window/#findComment-240166 Share on other sites More sharing options...
ahs10 Posted April 29, 2007 Author Share Posted April 29, 2007 thank you guys. i had to take a day off this project for this exact reason. why it never occured to me to have the link that presents this php page open in a new window, thereby solving my problem.....i have no idea what was wrong with me. anyweezer, as always, the masters of that reside here between these forum of freak walls were quick to answer. thanks again! Quote Link to comment https://forums.phpfreaks.com/topic/49023-solved-header-location-variable-load-in-new-window/#findComment-241029 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.