Target="_blank" not working

It’s simple, with anchor is easier to do rollover :slight_smile:

so, Backing to my question…

So, the best way to make an empty link like this:

<a href=“”>don’t click me</a>

I can do:

<a href=“#” onclick=“return false;”>don’t click me</a>

There’s a way to make an empty link change only inside the href?
Example:

<a href=“magic code to disable the link”>don’t click me</a>

Rollover effects are strongly associated with clickable links in the minds of web users.
‘Breaking’ those kinds of associations/conventions can lead to users becoming confused by a site (and leaving).
If the item isn’t a link, then there are several good reasons why it’s not a good idea to use dead anchor tags simply to give something a rollover effect.

It may seem simpler to use anchor tags, but it may not be the right method or even the best for your actual needs.
Depending on what you’re actually trying to do, there may be a more appropriate method available that is equally simple - quite possibly using the css hover pseudo-class.

Do you have an online example where I could see how you plan to use it more clearly?

It’s just as easy with images, spans, divs, or whatever if you know what you’re doing.


<img src="/off.jpg" onmouseover="this.src='on.jpg';" onmouseout="this.src='off.jpg';" alt="an annoying rollover that doesn't do anything" />

:tup:

What the hell are you talking about? :smiley:

See mmj’s post above about what most people can and cannot do.

But let’s assume that you’ve got some text, and you’re using proper anchor text and you’ve got good titles on your links. For example…


Are you having trouble getting your pages to validate because of the use of the 'target' attribute in your links?  Well over at the sitepoint forums, there is a very good <a href="somelink" title="Using target=blank with XHTML thread on sitepoint">discussion</a> about this very topic.

The reader will see that you’re talking about an external site and the tool tip title they’ll get with tell them that it’s on another site. If they want to click on that link, they now know that they will be directed to another page.

In my experience, the back button is not the only control that all people universally know how to use. They are also well aware of the X at the top right corner of the window. They know what do when they have multiple windows open and they want to get rid of one. They don’t sit there befuddled and burst into tears because somebody sprung a new window open without their approval… they close it.

Not everyone hovers over links looking for title text. Virtually no one outside of us web geeks has any idea they can shift click to open a separate window if they choose. (which I do almost all the time - in fact sitepoint screws me up big time because I always expect forum links to open in new windows so I don’t hit shift. Then I close the window of the “external” page only lose my sitepoint window. gets me every time :))

I still think the research shows that when a novice web user is browsing a page, and clicks on a link which pops up a new window, when they are done with viewing that new page they try to click the back button and when they can’t get back to what they’re doing they get confused trying to figure out what happened to the page which they had be previously viewing.

Again, IMO, with the proper anchor text, surrounding text and use of titles most people will understand that they are going to a different website and realize that they are leaving yours.

I will just continue to use target=“_blank” when I feel it is appropriate. No matter how you do it, there will always be some users that have some sort of a problem. I think all links to inside the website should be regular links but links to other websites should open in a new window, with a few exceptions…

I do not think that many people will be confused when the back button will not work because the site is in a new window. Most people will notice the new window opening.

Can you provide a link to this research. I’m definitely interested in it. My day job has two companies that are heavily web based. As a result we have many employees who are not web oriented, but are forced to use the web extensively due to the nature of our business. I’m not just talking the two sites but intranets, various web applications etc. etc. Complex third party software in some cases. They usually come to us (the geeks) for help. Some of them are pretty sharp, but some are forever doomed to be “web challenged”. Even the sharp ones aren’t as savvy as you’re suggesting. Again this is my experience only… I don’t “know” any facts regarding this topic. Would like to see the research.

I’ll see what I can find.

Didn’t I say that…?

:smiley:

> I think it is quite normal to have links to external websites open in a new window without a warning…!

Exactly. Hey, here’s a thought for you: it’s my site, so I will code it as I see fit. If people don’t like it, they can make their own site.

> Also, I have found that JavaScript that opens links in new windows are sometimes blocked by pop-up blockers…

Yep, not to mention that not everyone has JS enabled.

That’s about the most immature statement I’ve heard on these forums in a while. Great Job!

Oh the irony.

:agree:

The goal is to make it user friendly and to make people like it. Most of them can’t make their own.

And even if they could…it still an unreasonable thing to say

I’m not big on this idea that every website is supposed to be made for the benefit of ‘as many users as possible’ at the cost of the author’s own preferences and vision.

I can’t remember how many times I’ve felt the need to remind people that the web isn’t all about pandering to lowest common denominator users.

The web is meant to represent the ‘democratisation of information’.
There’s enough ‘space’ on the web to support everybody’s idea of a good website.

The attempt to portray those who don’t bend according to the needs of ‘low-end’ users as unreasonable is no less blinkered an attitude.
It is also arrogant in that it assumes a greater knowledge of another person’s target audience than they know themselves.

The web doesn’t have to be built according to one, narrow vision, so stop getting uptight just because the next bloke doesn’t agree with you.

Heaven forbid some people here should ever be let loose on a project that had an actual, specific target audience with specific tastes and requirements, rather than the ‘please everybody’ mentality.

Some people have very specific things they want to say through their work and their website.
I completely appreciate how compromising on the presentation of a website for the sake of users outside the target audience could be counter-productive to the success of that website.

It’s a shame that so many web developers and designers have become so blinkered and blinded by the admirable, but still more general, thrust towards accessibility standards.
It’s not an ethic that can or should be overlayed onto every site no the web, so it’s best we just begin to understand that and stop wasting our time calling those who disagree ‘unreasonable’ and ‘immature’.
Toeing the party line doesn’t make any of us an innately superior designer/developer.

Truly excellent post! I think the same way but never could have put it into words so perfectly.

I’m suprised that no-one has pointed out that it all depends on your target audience. If they are leading edge people, possibly using Firefox etc., then there is an argument for not using target=_blank.

I’m personally suprised that FF doesn’t just load in a new frame, rather than a new window, maybe you can configure that.

For the average site, I don’t think the world is yet ready, and it’s best to continue to use target=_blank for the moment. It’s a long standing convention.

Read my previous post (again?). :wink:

I actually feel that your conclusions are the wrong way round.
If it were felt that it is acceptible to use target=“_blank” at all, then I’d say that it is more acceptible to use it with FF users than average users.

FF users are generally more savvy, so will more likely know how to override it should they want to.
Average users are less likely to know how to override it, so would more readily appreciate the choice.

The point is not to take advantage of less skilled, less savvy users by forcing the author’s preferences onto those who don’t know how to override them.
Less-skilled users have at least an equal right to have choice, the only difference being that the less-skilled users need to have the choice made clear to them.
More-skilled users are more likely to be aware of the means by which they can override any specifications of a page. So whilst it is still fair to offer them the same choices, the imperative to do so is (possibly) lessened.

I do feel that it should ultimately be the author’s decision how as to ‘forceful’ s/he should instill their preferences for their site, but I personally don’t see that there’s anything to be gained by using target=“_blank” when more accessible alternatives exist.

There is one other factor that makes the issue largely academic for designers and developers - namely XHTML 1.0 Strict - which removes target from the debate entirely.
I and many others who build to XHTML 1.0 Strict appreciate the reasons for the deprecation of the target attribute and, I for one, am perfectly willing and happy to implement a clear choice using alternative methods that I’ve shown earlier in this thread.