Cedron_j Posted February 21, 2007 Share Posted February 21, 2007 I have been attempting to set redirect to a new browser window using the following commands: header("Window-target: blank"); header("Location: http://microsoft.com"); Unfortunately it opens in the same window instead of a new window. Can someone tell me the proper way to accomplish my task? Thanks, Cedron_j Link to comment https://forums.phpfreaks.com/topic/39544-newbie-open-new-window/ Share on other sites More sharing options...
jcbarr Posted February 21, 2007 Share Posted February 21, 2007 maybe use _blank instead... That is always what I have used in gernal HTML, might work for you here as well. Link to comment https://forums.phpfreaks.com/topic/39544-newbie-open-new-window/#findComment-190823 Share on other sites More sharing options...
Cedron_j Posted February 21, 2007 Author Share Posted February 21, 2007 I tried using _blank but the URL still opened in the same window. Link to comment https://forums.phpfreaks.com/topic/39544-newbie-open-new-window/#findComment-190830 Share on other sites More sharing options...
gterre Posted February 21, 2007 Share Posted February 21, 2007 use javascript..... example <?php if() { echo "<script>window.open('http://microsoft.com','_blank','')</script>"; } ?> Link to comment https://forums.phpfreaks.com/topic/39544-newbie-open-new-window/#findComment-190838 Share on other sites More sharing options...
Cedron_j Posted February 22, 2007 Author Share Posted February 22, 2007 I sure using javascript will work. Thanks for everyones assistance. Cedron_j Link to comment https://forums.phpfreaks.com/topic/39544-newbie-open-new-window/#findComment-191321 Share on other sites More sharing options...
redarrow Posted February 22, 2007 Share Posted February 22, 2007 go here ok. http://www.htmlgoodies.com/beyond/javascript/article.php/3471221 Link to comment https://forums.phpfreaks.com/topic/39544-newbie-open-new-window/#findComment-191322 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.