shadiadiph Posted July 28, 2009 Share Posted July 28, 2009 Is there any way of opening a new window from a header("location:index.php"); I knwo in html i would use target="_new" but am just wondering if it is possible in a header? Link to comment https://forums.phpfreaks.com/topic/167844-solved-is-there-any-way-to-open-a-new-window-from-a-header/ Share on other sites More sharing options...
bruce080 Posted July 28, 2009 Share Posted July 28, 2009 Well, I've included a link below to an article that I found useful with regards to this topic. I hope someone corrects me if I'm wrong, but from what I can tell, it is not possible to do what you are asking. You can however open the current page in a new window first, and then execute the redirect. http://www.webmasterworld.com/forum88/9053.htm I've also heard people mention other crazy methods including executing the popup code just before the header and then using output buffering, but I have not tried to get this to work and don't know how to do it. Hope this helps, Steven Link to comment https://forums.phpfreaks.com/topic/167844-solved-is-there-any-way-to-open-a-new-window-from-a-header/#findComment-885257 Share on other sites More sharing options...
shadiadiph Posted July 28, 2009 Author Share Posted July 28, 2009 mm not really still playing with it surely there must be a solution for it Link to comment https://forums.phpfreaks.com/topic/167844-solved-is-there-any-way-to-open-a-new-window-from-a-header/#findComment-885297 Share on other sites More sharing options...
.josh Posted July 28, 2009 Share Posted July 28, 2009 It is not possible to open up a new window with php. php is a server-side scripting language. Only way to do that is to have php send out clientside markup or coding (like js) to do it. Link to comment https://forums.phpfreaks.com/topic/167844-solved-is-there-any-way-to-open-a-new-window-from-a-header/#findComment-885299 Share on other sites More sharing options...
shadiadiph Posted July 28, 2009 Author Share Posted July 28, 2009 ok thanks crayon violent & bruce080 for the input if javascript is the only way of doing it i will give it a miss its something i never use. Link to comment https://forums.phpfreaks.com/topic/167844-solved-is-there-any-way-to-open-a-new-window-from-a-header/#findComment-885336 Share on other sites More sharing options...
shadiadiph Posted July 28, 2009 Author Share Posted July 28, 2009 i checked solved as i want to close this post Link to comment https://forums.phpfreaks.com/topic/167844-solved-is-there-any-way-to-open-a-new-window-from-a-header/#findComment-885337 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.