EchoFool Posted June 15, 2009 Share Posted June 15, 2009 Is there a way in php to open a new tab similiar to how HTML does its target="_blank" in href's ? I tried using header : location but that doesn't load a new tab with the destination it just does it in the current tab. Hope you can help. Link to comment https://forums.phpfreaks.com/topic/162189-solved-open-new-tab-in-php/ Share on other sites More sharing options...
Philip Posted June 15, 2009 Share Posted June 15, 2009 You want PHP to open a new tab on a browser? Not possible, it needs to be done with JS/HTML. Link to comment https://forums.phpfreaks.com/topic/162189-solved-open-new-tab-in-php/#findComment-855909 Share on other sites More sharing options...
EchoFool Posted June 15, 2009 Author Share Posted June 15, 2009 But doesn't JS/HTML only do it if you click a link rather than automatically? Link to comment https://forums.phpfreaks.com/topic/162189-solved-open-new-tab-in-php/#findComment-855912 Share on other sites More sharing options...
PugJr Posted June 15, 2009 Share Posted June 15, 2009 <script type="text/javascript"> window.open( "/index.php" ) </script> That'll open up a new tab/window. Not sure if it does tabs or what. Link to comment https://forums.phpfreaks.com/topic/162189-solved-open-new-tab-in-php/#findComment-855914 Share on other sites More sharing options...
Philip Posted June 15, 2009 Share Posted June 15, 2009 Yeah, thats another point. It's also configurable on the user's end to have target="_blank" open in a new window, or a new tab. Link to comment https://forums.phpfreaks.com/topic/162189-solved-open-new-tab-in-php/#findComment-855915 Share on other sites More sharing options...
EchoFool Posted June 15, 2009 Author Share Posted June 15, 2009 Ok thank you Link to comment https://forums.phpfreaks.com/topic/162189-solved-open-new-tab-in-php/#findComment-855923 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.