_self or _blank?

When coding for a link from your website to another website, that isn’t yours, (and assuming that you didn’t want to leave the hyperlinking to the default), would you do _self or _blank ?

Nope, hell I can’t even stand lightbox. As a user I come across a page with lightbox (especially if it has no js off fallback) and I usually end up screaming at the display “Oh for <snip /> sake, just let me open the <snip /?> image” – doubly so if the image in lightbox is still scaled down smaller than it’s real resolution even on my 1920x1200 display! Even help popups annoy me to an extent. (also see why I like that Opera prevents scripts from intercepting right clicks!)

Unless I’m playing a movie, making a game or making something like google maps, then NO. Scripting for nothing just pisses me off (see my opinion of how EVERY webmail service is flushing itself down the crapper with each new release)… and don’t even get me STARTED about the amateur hour flashtard sites. (aka websites built with flash for navigation or worse, EVERYTHING wrapped in flash)

Neither, well, kind of the first. See, I don’t design fixed width layouts as they are a miserable accessibility /FAIL/. There’s little legitimate reason to design fixed width layouts apart from some people being unable to kick their inner artsy fartsy type in a particularly sensitive spot. If there is some graphical element that’s supposed to go on a page that prevents me from at LEAST doing a semi-fluid layout, I throw that graphic away and come up with something else.

We have the W3C recommendations – the RULES for building pages. We have W3C guidelines for helping us to make our pages better for everyone.

TARGET on a non-frameset page is a violation of BOTH. (and frames/framesets are a violation of the guidelines) You can file this alongside using PX metric fonts on content area plaintext, colors that do not meet contrast minimums, slapping paragraphs around non-paragraph elements, or even simple idiocy like <td class=“heading”>

You shouldn’t be doing it in the first place… doing so is just sleazing out tranny code like it was still 1998. You might as well have fifteen div before the first actual content element, tables for layout, out of order headings, missing heading levels, presentational classes, multiple h1’s, presentational images in the markup, css embeds without media types, fat bloated javascript libraries just to replicate stuff CSS can do all on it’s own, inlined style attributes, image maps to build the main menu, static scripting in the markup or any of the hundred other bad practices people crap out websites with.

JJMcClure, the problem with your comments are that you seem to make all sorts of assumptions about my “sensibilities” and “principles” yet also in the same instance claim that you need me to reinforce my opinions (so that they can be understood and justified). Speaking on behalf of myself it’s quite clear that you really don’t understand in the slightest how or to what extent my principles extend. It’s also amusing of you to comment on my use of SitePoint because you “think” I may or may not feel a certain way about a particular feature. Even if I were to object to signature links I could turn them off through the control panel (or a third party script).

As for the idea of following your principles:

There’s absolutely nothing wrong with forcing visitors to do whatever the hell it is you want them to do

Years ago while speaking to an individual (who is now legit and a security engineer), that exact same sentence came up in a discussion as to his individual justification for writing, constructing and injecting malicious software into end-consumers machines. The individual in question stated that there was absolutely nothing wrong with forcing users to do whatever the hell he wanted them to do (by any means necessary). Now while I’m not accusing you of doing anything of the sort, I find it rather amusing that on one hand you’re all for the hard sale and forcing user behaviour, yet if you really stood by those principles (of manipulating behaviour) you wouldn’t be picking hairs by leaving out illegal methods of maximizing revenue. We all have our own ideas as to what constitutes abuse or what is the right or wrong thing to-do (and that’s fine), but you are a hypocrite if you honestly believe in what you stated above (as quoted) absolutely yet you don’t follow it through in practice. :slight_smile:

PS: This is the last post I’ll be making on this matter, it’s clear that things are (yet again) getting personal.

Off Topic:

It was probably the wrong word to choose; it seems to trigger a ‘red rag’ at SP using the above word f*rce - extremely weird consequences can occur.

What Alex meant was; it was misusing the target attribute to spawn a window (outside of a frameset environment), which typically is harder to prevent than using a JavaScript solution of unobtrusive progressive enhancement.

Misusing the target _blank solely for spawning a ‘popup’ style window can become an accessibility and usability issue since it breaks the back button, etc.

You wasted your time typing this out, it’s just more avoidence and 'oh help,. he’s attacking little ole me!!"

:lol: P.S Alex, that’s pedantic hair splitting. ‘Forcing’, ‘influincing’, same thing mate. Let’s throw in ‘urging’, guiding’, ‘pushing’ and a bunch of other ‘ings’ that you probably think are abusive.

No Alex, you prefer what suits your own sensibilities and live in a world where using _blank is abuse. I think not allowing sig links for new posters is abuse, it’s definitely not in their best interests, wanna answer that or are you just going to avoid that too, and before you go into one about spammers and how that’s different from normal users, anyone who uses a site is hoping to get something from it. Sitepoint wnats to be a good resource, to that end it forces certain behaviour on it’s users to acheive that goal, doesn’t matter whether you approve or not, it’s still forcing behaviour.

I thnk you should stand up for your principles and boycott Sitepoint.

I’d argue that using JavaScript to insert the “target” attribute is just cheating. All you’re doing is bypassing the validator so that you can get that nice green seal of approval and feel like you’re doing the right thing, when in reality you’re still not adhering to the standards. You might as well just stick it straight in the HTML.

JJMcClure, that is your opinion and I don’t happen to agree. So let’s just agree to disagree on that point as it’s only going to lead to more arguments.

If I am correct you just put a name like this. No JS involved

<a href=“http://example.comtarget=“name>test</a>

If the window is already opened before it will not open a second time but open the url in that window that is alreay open.

How does that work please, Stephen ? Is JS involved ?

The answer out of those two evils; it would be; _blank since; _self should load the document in the same frame as the element that refers to the special target.

Albeit like was mentioned you should use unobtrusive progressive enhancement of script should you which to perform such actions. Which lay outside the scope of a frameset, which may or may not be blocked anyway by the browser, i.e. both the opening of a new browser instance or the script option.

You’re just trolling now mate, take it elsewhere unless you have something useful to add to the discussion.

This statment is just so full of assumptions. I should ‘NEVER’ force a choice? When you come on this site you have choices forced on you from the second you log in but having a new browser window opened for you is just a step too far, a bit beyond the pale? Navigation has to be forward/backward? And since when do we have to do anything conventionally on the internet, that kind of thinking is not what got us to the point in our lives where you and I could even be having this exchange.

Gosh… I’m all for meeting user’s needs and providing a good experience but this hoohaa over opening a new browser window is just so out of perspective. I gotta ask you, would you use a popup/under? Would you use techniques that only work for people with JS enabled or Flash installed? Do you design for 800x600 still forcing some people to sideways scroll? Where is your boundary?

You actually comparing using illegal methods with forcing a new browser window to open? And if I wouldn’t use illegal methods then I’m a hypocrite because I would use _blank? Maybe you should take a few minutes before your next reply, these knee jerk responses don’t seem well thought out.

Alex, you need to think this through. Your ‘principles’ logic is unsound because I can simply reverse it and say that if you stuck to your principles there isn’t a website on the whole internet that you’d actually be able to visit since they force certain types of behaviour, but I wouldn’t use such a flawed and simple argument.

Alex, forcing a new browser window open is not ‘abusive’ and no website in the world puts it’s users needs first without having first defined what those are in the context of the website’s purpose, i.e. what suits the website owner, you seriously need to step back and recallibrate. The real irony is that I don’t use _blank, I just built three sites without using it but your sermonising and use of the word ‘abusive’ is just ridiculous. I want you to get some perspective.

What is it with you and not forcing behaviour on users? There’s absolutely nothing wrong with forcing visitors to do whatever the hell it is you want them to do, it’s your website not theirs and they don’t have to visit it. I can’t believe you used the word ‘abusive’, you’ve lost all perspective if you think using an HTML attribute is abuse. Seriously…

However you build a site, you’re forcing your visitors to behave the way you want them to. Forcing behaviour is the smart thing to do, it’s the profitable thing to do, it happens everywhere in everyday life and you’re subject to it wherever you go but you don’t seem to mind that, just when it’s websites and then you get on your soap box.

And if your revenue stream depends on their not only visiting it, but staying there? Doesn’t sound like a good business plan to me.

Now personally I do rather take offence when someone tries to force me to do things. Actually, come to think of it, so does the law of the land. For instance forcing people to hand over their money against their will seems to be “wrong” to most people and society as a whole.

At least on a web site people have the choice to leave. And they know they do, and they actually will and do.

Sorry JJMcClure but as much as I’d like to believe that you want me to further explain my perspective and backup my viewpoints in order to enrich the conversation, past presidence from earlier conversations in this forum on the same subject have always degraded into personal arguments with neither of us changing our opinions. I see little reason to make the same mistake again and while you perhaps have noble intentions this time, you should be well aware of my views on the matter as I’ve clearly explained my reasoning for reducing user manipulation in previous threads. I really don’t have the time or energy to get caught in yet another “I must convert them to my way of thinking” match, which is what inevitably seems to occur. So I’ve stated my opinion (which I’m entitled to) and I’ll leave it at that. :slight_smile:

PS: You seem to have confused “forcing” behaviour with “influencing” behaviour, you can’t force someone to use a site (and it’s functionality) unless it has no competition or you physically have a gun to their head. I’m all for influencing users, as long as that influence doesn’t eliminate the option of choice (or leave the end user out of control of their experience). Yes the hard sale will result in (of course) more business being done, but I prefer what’s in the users best interest (not mine).

Great post Deathshadow, now that’s how you argue for something.

Gonna continue to disagree with your position that no one should use _blank because I believe there are plenty of times when it’s ok to force a choice and that we shouldn’t be so precious about the merest possibililty of pissing users off, I think forcing choices happens to one degree or another everytime you ever visit a website. I’m a WC3 fan but I don’t agree with this position. But… your logic is sound, you’re not using the word ‘abusive’ and I like the way you rigorously adhere to standards and the professionalism you exude.

NEITHER – if the user wants to open it in a new window they can middle-click or shift click. You should NEVER shove that choice down the end users throat unless you want to piss them off by breaking conventional forward/back navigation.

That’s WHY the TARGET attribute is deprecated in MODERN doctypes. Sure if you want to deploy in Tranny it’s still available, but transitional is for supporting old/outdated/<snip/> coding techniques that have NO PLACE on new website! It’s invalid markup in STRICT for a REASON! I only write pages in STRICT, so it’s not even an OPTION.

… and no, using javascript to replicate that functionality is not an answer either. (figured I’d say that before one of the jquery <snip/> shows up.) — though if you REALLY want to do it I supposed you could always ask Mr. Peabody and his boy Sherman to take you back in time a decade.

<BTO>
So I took what I could get, yes, I took what I could get…
Oooh and she looked at me with big brown eyes, and said
</BTO>

I know this response is rather late but why are you opposed to using JavaScript?

In cases such as this, it’s better to have an unobtrusive script which doesn’t force behaviour upon the end user than to use the HTML equivalent that will not only damage the user-experience but have serious implications for how the browser handles such events. Scripting is not a bad thing, it only becomes bad if people abuse it… just like HTML. What you are doing may be out of what you believe is in the users best interests but the reality is that using the target attribute these days IS more abusive to the end user than an optional script. There is a VERY good reason why target was deprecated, don’t use it. :slight_smile:

I don’t want to ‘disagree’, I want you to back up your publically stated opinion Alex, that’s what forums are for and that’s how we all learn. Backing down achieves nothing, if you don’t want to support your view then don’t post in the first place. You can’t post and then run away when you get called out.

Every element of every website that’s ever been built is forcing users to behave in one way or another, every design decision, every shopping cart, every sign up procedure, every navigation layout, all the site architecture, it’s ALL forcing behaviour, even the way forums operate forces us to behave in a way that suits the forum. I bet you don’t mind the min post count for sig links do you… no, because that forced behaviour happens to suit you.

If I choose to have people leave my site in the same window or force them to open another window, it’s my choice and they don’t ever have to come back if it doesn’t meet their particular needs but to use the word ‘abusive’ is just ridiculous. It’s PC gone mad in the virtual world.

Exactly. The “reserved” names (with underscore) are:

[list][*]_blank - opens a new window
[*]_self - opens in the current window/frame
[*]_parent - opens in the parent frameset (if available), or if no frameset, in the current window
[*]_top - opens in the current window, regardless of any frameset.[/list]

Any other target attribute will look for a window or frame with that name, and if none is available, will open a new one. The corollary to this is that you should try to make sure that the name you choose will be unique and not one that might have been used by another site. Thankfully as there are only a handful of people still embracing the nineteenth century and using the target attribute at all, that isn’t so much of a problem as it used to be :cool: