/    Sign up×
Community /Pin to ProfileBookmark

What is wrong with target="_blank"

I thought I’d try and be a bit more standards compliant so I tried building a page where the doctype is ‘strict’.

When I validated it I was told that that target=’_blank’ does not validate.

How do they expect you to open new windows? With javascript?

to post a comment
HTML

10 Comments(s)

Copy linkTweet thisAlerts:
@CharlesSep 30.2006 — Opening new windows is problematic for some and annoying to most.

But if you must then use JavaScript but do it properly:[code=html]<a href="http://www.w3.org/" onclick="window.open (this.href, 'child'); return false">W3C</a>[/code]
Copy linkTweet thisAlerts:
@The_Old_SargeSep 30.2006 — ".. annoying to most."

How so, Charles?
Copy linkTweet thisAlerts:
@CharlesSep 30.2006 — Why do you think that pop-up blockers have become so popular?
Copy linkTweet thisAlerts:
@felgallSep 30.2006 — The idea is that you let your visitors decide whether to open a link in the same window or a new window. To open in the same window they left click the link. To open in a new window they right click the link and select open in a new window. If you force the link to open in a new window then you take away their option to open it in the same window if that is what they want.
Copy linkTweet thisAlerts:
@The_Old_SargeOct 01.2006 — Ok. I see that, Stephen. But not everyone is aware you can right-click to do that.

Charles, pop-up blockers block pop-up that open whether you "ask" them to or not. Opening in a new window is not the same thing.
Copy linkTweet thisAlerts:
@CharlesOct 01.2006 — Opening in a new window is not the same thing.[/QUOTE]Perhaps, but it is despised just as much. It's my desktop and I'll thank you to not monkey with it.
Copy linkTweet thisAlerts:
@WebskaterauthorOct 01.2006 — Thanks for your replies.

On the opening window front - the site in question is basically a sort of information centre for residents in a coucil resident's association.

So there are loads of links that need to lead to other people's sites - the councills main site, reporting graffiti, where to go to get repairs, list of pharmacies in the area open at night etc etc. There will be about 30 links.

When I am on a site like this that provides information, it drives me nuts if they open the new page in the same window - you end up clicking the back button all the time. I'd rather have a new window - if I have clicked on the wrong link - or I can't find the info I want - I can close the window and the original 'information reference' window is still there.

Each to their own I suppose but opening a new browser window seems perfectly logical to me for lots of reasons.

Using target='_blank' means the user clicked on something to open the window - so it was their choice (as opposed to pop-ups).

Seems typical of the world today - someone decides what is right and then tries to impose their view on the rest of the world. Guess I'll be sticking with 'transitional' then.
Copy linkTweet thisAlerts:
@CharlesOct 01.2006 — You are mistaking your likes and desires for that of your users. A minority like new windows. For another minority, however, the new windows can make the site imposible to navigate. Think of someone restricted to the keyboard and a head wand.

Perhaps you need a note telling people that they can use the context menu on most graphical browsers to open the link in a new page. Of course, that would be insulting to me but perhaps I'm a minority.
Copy linkTweet thisAlerts:
@The_Old_SargeOct 01.2006 — Webskater brings up a very good point ... about sites that are sort of "dependent" upon lots of links and lots of other pages.

Personally, I'd rather have 30 or 40 windows open, especially if I need access to more than one at a time. Clicking tabs on the start bar is quicker, easier and less time consuming than multiple clicks of the browser back button and then clicking links again. The back button does not mark your spot as the start bar does.

Preference obviously, but for certain applications I think the preferences switch.
Copy linkTweet thisAlerts:
@WattsOct 02.2006 — Try <A HREF="blah" TARGET="new"> and see if that validates. FWIW, as an end-user I prefer new windows (especially when googling), although I tend to right-click as a force of habit anyway.

I think it's all in context. If the link is a reference, such as a bookmark or other such notation where the user is expected to return back to your page then new windows are my preference.
×

Success!

Help @Webskater 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 4.29,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...