Left Quote    Copy from one, it's plagiarism; copy from two, it's research.
- Wilson Mizner    
Right Quote
[login] | [Register]

New windows without using the target attribute

by: sm0ke
Page: 1 of 2
(View All)

[b]Introduction[/b] Should we open links in a new window? or should we give the user a choice? This is in fairness quite a hotly debated argument in certain circles, to force a users hand or to let them choose. A lot of people against the idea of opening links in a new window say that the user can right click the link and choose to open a new window or not. Personally I dont see more than 4% of my users knowing they can do this (based on experience). As you may or may not know, when writing web documents in XHTML using a Strict doctype, the commonly used [b]target="_blank"[/b] attribute of the anchor tag (used to force links to open in a new window) is no longer valid. So we need a new way to accomplish it. I'm going to show you two ways of opening the links in a new window, both require the user to have javascript enabled but the second methos will still create a functioning link which opens ion the same window if javascript is disabled. [b]JavaScript popup[/b] Paste the following code between the tags of your page: [code] [/code] Next we need to create the link. Paste the following between the tags of your page: [code] This is the link text [/code] Ok, thats the first method done with, its quick, easy and painless.

1  |  2  |  
Next »

No Comments for this page.

You Must be logged in or a member to comment.

Tutorial Stats

Tutorial Stats

0 Total Comments
0 Rating of 5 ( Votes)


Tutorial Options

· Login to Rate This Article
· Login to Post a Comment
· Read more by this author
Digg This Article! Bookmark This Article Reddit: Bookmark This Article BlinkList: Blink This Article! YahooMyWeb BlogMarks: Add This Mark! Furl: Save This Article Spurl: Mark This Article



· Site Design Made Simple
· HTML Tutorial
Your Article Here

"" Copyright © 2002-2018; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank