Randy Tayler Web Design
web design 

Graphic Web Design


Home
Design Portfolio
Rank Portfolio
Programmer Portfolio
Flash Portfolio
Hiring Me

Search Engine Rank
Web Design ABCs

Targets



Did you know: you can right-click on a link and tell it to open in a new-window?

Of course you did. Who doesn't? I mean, besides Mac users, whose once-groundbreaking machines still have but one mouse button.

Now, have you ever done that and gotten, not the page you were looking for, but a Javascript error?

That's because some windows are intended to be opened in new windows, and the designers of the page used Javascript to force a smaller window size or different window type for that link. The designers are trying to control you.

Don't you love it when other people try to control you?

NO?? Well, welcome to the human race. You know what the race is, right? It's the race for power, for control. And in this case, naughty designers are trying to usurp control of your web experience.

Now, let's say you want someone to stay at your site, but you also want to link to another site. Many users will right-click and open the link in a new window on their own accord. And you don't want to punish them for being intelligent, yet you want to help others stick around. That's why we have the TARGET tag.

(The TARGET tag is also critical for proper frames-oriented sites, but you shouldn't be using frames anymore, anyway. They stopped being cool right about the time 56k modems came out.)

So, you have something like the following:

<a href="link.html">click here!</a>

And you want to have that link open in a new window. Easy, easy, easy. Change it thusly:

<a href="link.html" target="_new">click here!</a>

The beauty of this method is that it doesn't offend the folks that are already TRYING to stay at your site, and are right-clicking on links to open them in new windows.

When would you not use this method, however?

If you really need the user to open the link in a smaller window, or a window with no menu bars or address bars. It happens. It's useful for little "help" windows on a form submission page -- you don't want the user to leave the page and risk losing all the info they put into the form, but they need to read your Terms of Use, or somesuch. And if you open it in a new window with the target method, they just might get confused (it happens) and not find their way back. The "Back" button won't work in that new browser, after all.

Well, here are a few tricks. One, use the Javascript rollover events to change the status bar to say "New Window:" and then the name of the page. That way the smart users know they don't need to right-click it to open it in a new place.

Two, you might consider disabling the right-click on that link, and replacing the normal menu with an alert box that says "This link will open in a new window."

Three, if you expect regular traffic, use icons to delineate links that open in new windows. Note, however, that this can be a hassle for new users, who first see the icon, and then have to find the key to decipher it.

All in all, though, the designer should avoid trying to control the user. Why? Because the customer is always right. And in a world with 10 billion web pages and counting, you must bow to the whims of your users, or they will replace you with the press of a button. (Only then, when your users choose you out of love, do you have real power. And with that power, you can rule the world! [sinister laugh])

All content ©2005-2009 Randy Tayler
Web Site Design | Search Engine Optimization | Search Engine Rank Tips | Graphic Web Design Tips | Contact | Site map
LDS singles | My blog | Podcast advertising | Podcast directory