Jump to content

Archived

This topic is now archived and is closed to further replies.

EchoFool

[SOLVED] Open new tab in php

Recommended Posts

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.

Share this post


Link to post
Share on other sites

You want PHP to open a new tab on a browser?

 

Not possible, it needs to be done with JS/HTML.

Share this post


Link to post
Share on other sites

But doesn't JS/HTML only do it if you click a link rather than automatically?

Share this post


Link to post
Share on other sites

 <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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.