/    Sign up×
Community /Pin to ProfileBookmark

Targeting Tabs Instead Of Windows

When I set a target <…target=’_blank’>, in IE, Opera and Chrome/Iron, the browser will open a new tab, but in Firefox and Safari, it will open a new window.

Does anyone know of a way to direct FF and Safari to open <…target=’_blank’> in a new tab?

CTB

to post a comment
HTML

10 Comments(s)

Copy linkTweet thisAlerts:
@rpgfan3233Feb 16.2009 — It is a user's choice to prefer tabs instead of windows. There is no way for an author to control this behaviour since that would show a complete disregard of the concept of "user settings".
Copy linkTweet thisAlerts:
@chestertbauthorFeb 17.2009 — Thanks 3233. Yes. I understand your point. However, having selected a preference for tabs, the user would be looking for consistency.

Neither FF nor Safari offer a user preference to set "new pages to open in new tabs" (or similar). There is no "user setting" to completely disregard (although in FF, there is probably an extension that provides it).

But you may be right. Is it preset in those browsers. and if so, is there a user editable file that can change the behaviour?

Cheers

CTB
Copy linkTweet thisAlerts:
@felgallFeb 17.2009 — The Tab Mix Plus extension for Firefox allows you to specify what sorts of links you want opening where. In mine I have all full domain references open in a new tab (along with window.open calls from JavaScript) and all other links open in the same tab.
Copy linkTweet thisAlerts:
@chestertbauthorFeb 17.2009 — Thanks felgall.

I was having FF speed problems so I'd uninstalled TMP and just forgot about putting it back, so thanks for the reminder. (I use Crazy Browser as my default, because it handles tabs better than any other, so it wasn't an issue for me.)

The 'problem' (if it fits into the category of 'problem') is less for me than it is for general users. "Oh, the site won't work properly until you've installed the TMP browser extension" just doesn't seem like viable advice (or good programming) to me. But if there's no easy solution, I'll just put it on my wish list and move on.

Cheers

CTB
Copy linkTweet thisAlerts:
@NogDogFeb 17.2009 — I've not installed whatever that TMP FF extension is, but my Tools -> Properties menu option gives me the attached image.
Copy linkTweet thisAlerts:
@chestertbauthorFeb 17.2009 — Thanks NogDog.


Yeah, I had already set that to "in a new tab", but FF still opened in a new window

Can you do me a favour and test the following on your installation?

test.htm
[code=html]<html>
<head>
</head>
<body>
<a href="testf.htm" target="_blank">Click Here</a>
</body>
</html>[/code]

testf.htm
[code=html]<html>
<head>
</head>
<body>
<p >THIS SHOULD BE IN A NEW TAB</p>
</body>
</html>[/code]


TabMixPlus does fix it in FF, and Safari still appears to have no such preference.

CTB
Copy linkTweet thisAlerts:
@NogDogFeb 17.2009 — Opens in a new tab for me.
Copy linkTweet thisAlerts:
@chestertbauthorFeb 17.2009 — Hmmm.

Thanks NogDog.

I suspect I have a weekend of trashing and re-installing my system coming up.

Doesn't solve the Safari problem though, so I gues I'll just have to ignore the five people and a springer spaniel who use it and get on with more important tasks.
Copy linkTweet thisAlerts:
@NogDogFeb 18.2009 — Or rethink why you are opening new targets. Is it really necessary; could you just leave it up to the user to right click and open in a new tab if he wants to? Would a JavaScript/DOM/CSS solution with a "pseudo-window", possibly populated by an AJAX call, be just as applicable (with the targeted link available as the fall-back for those not running JavaScript)?
Copy linkTweet thisAlerts:
@chestertbauthorFeb 18.2009 — ...could you just leave it up to the user to right click and open in a new tab if he wants to? [/QUOTE]

Normally, I'd agree with you. I'm a big one for allowing the user to work the way he prefers, rather than the way I'd prefer.

However, we use the new window/tab option in two ways.

First, the focus our project is a Content Manager, so we give the user the option of opening the control panel of the CMS in a new window. Some think it's easier to have the live site on one page, and the CMS that lets you add stuff to it on the other. Add on one, then switch back, refresh.

Second, within the user created CMS menu structure, we have an option that allows a menu item to link to an external site, and we provide the option to open that site in a new window. The rationale is that you don't want to send your user off to another site and then not come back. The option is there to set either. Actually, there's even a third option to open the new page within an iframe, but space constraints and potential conflict make this less than desirable.

Thanks for everyone's help with this distraction.

Cheers

CTB
×

Success!

Help @chestertb spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...