JD Isaacks
JD Isaacks

Reputation: 57974

New Window or New Tab -- Way to decide?

On a link, is there a way to specify whether the new _blank window is actually a new window or a new tab?

Thanks

Upvotes: 4

Views: 1232

Answers (5)

Karmic Coder
Karmic Coder

Reputation: 17949

There is no garuanteed way to do this. You can, however, specify height and width for you new window. Doing this will force the link to open in a new window, and not a tab in most browsers.

window.open(url, windowName, height=400, width=400);

I would caution against doing this, however. Tabs vs. windows is a user preference for a reason.

Upvotes: 6

Tomas Aschan
Tomas Aschan

Reputation: 60584

No, there is not (at least not in the current HTML specifications...).

And actually, why would you want to? The user probably has set his/her browser to open either in tabs or windows depending on what the user prefers. Overriding user preferences will just piss them off :P

Upvotes: 4

janhartmann
janhartmann

Reputation: 15003

Nothing yet, but when new browsers support CSS3 we will have the ability to tab link. Take a look at http://www.w3.org/TR/2004/WD-css3-hyperlinks-20040224/#target0

Upvotes: 5

Quentin
Quentin

Reputation: 943564

No, there isn't.

Upvotes: 0

Tordek
Tordek

Reputation: 10872

No, there's not.

Upvotes: 0

Related Questions