3

Possible Duplicate:
Open url in new tab using javascript

I'm trying to make it so that something opens up in a tab, not a window. As far as I can tell, this is set by browser preference. Is there no real way to override this? I understand you can use window.open, but is this subject to browser preference? I'm currently using target="_blank".

1

2 Answers 2

1

You can do this with the following CSS:

a { target-name: new; target-new: tab; }​​​​​​​​​​​​​ 

See this example (please not it does not work because jsFiddle does not support tabs. It is merely for demonstration purposes)

As simple one line solution:

<a href="http://www.bbc.com" target="new" style="target-name:new;target-new:tab"> Text </a>​ 
Sign up to request clarification or add additional context in comments.

Comments

0

For now, there is really no way for you to have it open in a new tab instead of a new window. It is, as you said, a browser preference.

As to jacktheripper's response. It looks like the target-name property is not supported in any major browser*.

*CSS3 target-name Property

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.