views:

107

answers:

5

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

Thanks

A: 

No, there's not.

Tordek
A: 

No, there isn't.

David Dorward
+5  A: 

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

meep
+4  A: 

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

Tomas Lycken
+5  A: 

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.

Mike
which browsers open window.open in a new tab?
Pasta
+1 In most cases, it is best to let the user decide. @Pasta, in Firefox 3.5.6 you can set it under Tools>Options>Tabs>option:"Open new windows in a new tab instead"
J.Hendrix
Chrome also does so by default. I would speculatively say most browsers are heading in this direction.
Mike