navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

Don't open new windows (tutorial)

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Community >> OutFront Discoveries >> Don't open new windows (tutorial)
Page: [1] 2   next >   >>
 
Webnauts

 

Posts: 38
Joined: 8/8/2004
Status: offline

 
Don't open new windows (tutorial) - 8/8/2004 14:57:20   
Actually you should not force links to open in a new window or popups (such as with the "target" attribute or with JavaScript).

As you might know, JavaScript is not supported by all browsers and some users disable it. When JavaScript is used, it should not be relied upon.
In such cases you will disable your visitor to access your content.

You should avoid as far as possible implementing JavaScript, to avoid running risks on complications on the end users machines, or while goverment and other employees are required to disable this feature, for security or other reasons. Also there is a number of users who are very concerned about security issues and disable this feature too.

The issue here is not only concerning users disabling JavaScript in their browsers. How many do so? 8%?

What about cell phone users? How about sight impaired users? For the ones who when changing the current window or popping up new windows can be very disoriented, while they cannot see that this has happened. And how much percent are they?

The usability Jakob Nielsen say's about this:

quote:

JavaScript in Links.

Links are the Web's basic building blocks, and users' ability to understand them and to use various browser features correctly is key to enhancing their online skills.

Links that don't behave as expected undermine users' understanding of their own system. A link should be a simple hypertext reference that replaces the current page with new content. Users hate unwarranted pop-up windows. When they want the destination to appear in a new page, they can use their browser's "open in new window" command -- assuming, of course, that the link is not a piece of code that interferes with the browser’s standard behavior.

Users deserve to control their own destiny. Computers that behave consistently empower people by letting them use their own tools and wield them accurately.
Source: http://www.useit.com/alertbox/20021223.html


Another fact is, that if you markup with XHTML Strict, the "target=_blank" is not supported!

If you absolutely must open a link in a new window, explicitly warn the user with a clear indication that the page will open in a different window. Provide a title attribute on the anchor tag with a description indicating that the link opens a new window; for example:

<a href="http://www.eypd2003.org" target="_blank" title="Link opens in new window.">European Year of People with Disabilities 2003 (new window)</a> 


If you do so, keep in mind that targeting a link to open in a new window violates the W3C/WAI Web Content Accessibility Guidelines [1], and (if you're in the United States or other country with comparable anti-discrimination legislation) is quite possibly illegal under federal civil rights law.

Radical changes of focus in a GUI environment are extremely disorienting to blind users who are navigating by screen reader, and thus can be considered discrimination against the visually impaired.

- Opening a link in a new window also breaks the back' button on the browser, preventing back-tracking in navigation;

- It also bypasses the tabbed navigation in Galeon and Mozilla, irritating users of that feature;

- If your user wants to open the link in a new window, he or she can do so quite easily with most browsers; there is no need to force the issue;

- It's about leaving the user the freedom to navigate in the way that works best for him or her;

- It's not unusual for a designer never to have thought about such issues; that's why we have the WCAG to point out to us things we might otherwise overlook. Or?


After all do you want to build an accessible pop-up window? Then add the code below within the head tags of your HTML document. (Script source: http://www.accessify.com)

<script type="text/javascript">
var newWindow = null;

function closeWin(){
if (newWindow != null){
if(!newWindow.closed)
newWindow.close();
}
}

function popUpWin(url, type, strWidth, strHeight){

closeWin();

if (type == "fullScreen"){

strWidth = screen.availWidth - 10;
strHeight = screen.availHeight - 160;
}

var tools="";
if (type == "standard" || type == "fullScreen") tools = "resizable,toolbar=yes,location=yes,scrollbars=yes,menubar=yes,width="+strWidth+",height="+strHeight+",top=0,left=0";
if (type == "console") tools = "resizable,toolbar=no,location=no,scrollbars=no,width="+strWidth+",height="+strHeight+",left=0,top=0";
newWindow = window.open(url, 'newWin', tools);
newWindow.focus();
}
</script> 


Then add your link in the body of your document as below:

<a href="http://www.w3.org/WAI/" onclick="popUpWin(this.href,'standard',640,480);return false;" onkeypress="popUpWin(this.href,'standard',640,480);return false;" title="Link open's in a new window">Web Accessibility Initiative (WAI)</a>


Example see here: http://www.webnauts.net/popup.html - Test it disabling JavaScript to see how it works!


Further reading:

Not opening new windows: http://diveintoaccessibility.org/day_16_not_opening_new_windows.html
Use interim solutions: http://www.w3.org/TR/WCAG10/#gl-interim-accessibility <http://www.w3.org/TR/WCAG10/
Opening a link in a new window: http://lists.w3.org/Archives/Public/www-validator/2002Apr/0100.html

---
Notice: This article is written by John S. Britsios, founder and owner of the Webnauts Net and may be reproduced in a website, e-zine, CD-ROM, book, magazine, etc. so long as his name is included in full, including a link back to this website.

< Message edited by Webnauts -- 8/11/2004 14:54:17 >
slbergh

 

Posts: 322
Joined: 11/8/2002
From: Iowa
Status: offline

 
RE: Don't open new windows (tutorial) - 8/8/2004 20:26:59   
Not to mention that those of us using popup blocking software, depending on the blocker used, won't necessarily see the new window, especially if Javascript is involved. Personally, I can't stand links opening in a new window and would rather find a similar site whose links behave normally.

_____________________________

Digital data lasts forever...or 5 years, whichever comes first!

(in reply to Webnauts)
Webnauts

 

Posts: 38
Joined: 8/8/2004
Status: offline

 
RE: Don't open new windows (tutorial) - 8/8/2004 20:45:42   
If I got you right, I am not sure if you got what I mean.

Turn off Javascript in your browser or run your pop-up blocker, and then click on this link: http://www.webnauts.net/popup.html and tell me if you saw a window or not.

(in reply to slbergh)
Spooky

 

Posts: 26599
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Don't open new windows (tutorial) - 8/8/2004 21:47:00   
With javascript off, no popup.
The new information is just loaded in the focused window

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to Webnauts)
Webnauts

 

Posts: 38
Joined: 8/8/2004
Status: offline

 
RE: Don't open new windows (tutorial) - 8/8/2004 22:18:35   
Isn't that an accesible to content solution?

(in reply to Spooky)
Webnauts

 

Posts: 38
Joined: 8/8/2004
Status: offline

 
RE: Don't open new windows (tutorial) - 8/9/2004 18:58:59   
And Spooky, how would you open a new window, not a pop-up in XHTML Strict 1.1, with Javascript disabled?

(in reply to Webnauts)
Spooky

 

Posts: 26599
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Don't open new windows (tutorial) - 8/9/2004 19:39:00   
I thought you meant it was supposed to open a new seperate window :)

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to Webnauts)
Webnauts

 

Posts: 38
Joined: 8/8/2004
Status: offline

 
RE: Don't open new windows (tutorial) - 8/9/2004 20:55:25   
No it does not suppose to open a new window. If it would be so, then accessibility would be violated.

(in reply to Spooky)
slbergh

 

Posts: 322
Joined: 11/8/2002
From: Iowa
Status: offline

 
RE: Don't open new windows (tutorial) - 8/10/2004 12:19:42   
It did open with my blocker on and my JS off. Some don't.

_____________________________

Digital data lasts forever...or 5 years, whichever comes first!

(in reply to Webnauts)
RonHolton

 

Posts: 6
Joined: 8/10/2004
Status: offline

 
RE: Don't open new windows (tutorial) - 8/10/2004 16:57:20   
I'm sure I'm looking at this wrong, but I prefer a separate window. It may just be psychological but I feel better knowing that the page I started on is still open. Net congestion can often make a response to the"back" button slow, but toggling between windows remains a fast operation.

Also, I have designed a couple of online courses for the State Virtual Learning Community, and they insist that we do this. I'm not sure why, but perhaps it has something to do with the fact that the student is in a password protected site and the "back" button may not work.

(in reply to slbergh)
Webnauts

 

Posts: 38
Joined: 8/8/2004
Status: offline

 
RE: Don't open new windows (tutorial) - 8/10/2004 17:47:08   
OK everybody. Lets make a legal compromise:

Until user agents allow users to turn off spawned windows, you should not cause pop-ups or other windows to appear and do not change the current window without informing the user [P2, 10.1]. Avoid specifying target="_blank" because spawning a new window can be confusing and disorienting to the user.

If a new window MUST be spawned, it is recommended that it be indicated in the link description, such as by adding "(new window)" to the link description.

But I am still wondering, how designers open new windows designing in XHTML 1.1 Strict, also considering the possibility of JavaScript being disabled in the browser of the user?

(in reply to RonHolton)
Radio Guy

 

Posts: 251
Joined: 12/7/2001
From: Vidalia Louisiana USA
Status: offline

 
RE: Don't open new windows (tutorial) - 8/10/2004 17:53:16   
I sure don't want to be breaking any laws, but I've been using the "target_blank" code for some time, and for what I thought was good reason.
I have a website that promotes our small tourist town in Mississippi. The site links to lots of bed and breakfast, attraction and business sites. I coded those links to open in a new window specifically so that the visitor could always return easily to the "Mother Site". You can see what I'm talking about at NatchezMS.com.
For example, lots of my visitors want to see several bed and breakfast sites before choosing one to make reservations. I thought I was making it easier for them. Is there a better way?

_____________________________

#1 Country Song with a bullet: " They May Put Me In Prison, But They Can' t Stop My Face From Breakin' Out"

(in reply to RonHolton)
Numbers

 

Posts: 5
From: Pittsburgh, Pa, Allegheny
Status: offline

 
RE: Don't open new windows (tutorial) - 8/11/2004 4:27:42   
What about the confirmation page for a form? Without using a new window the customer will have to redo the entire form to make corrections.

I have the same situation as Radio Guy above. I'm also using frames and do not want the confirmation page to appear in the active frame because the customer may want to print out only the submitted information.

Bye the way, all the links on this page open in a new window.

(in reply to Radio Guy)
Thomas Brunt

 

Posts: 6109
Joined: 6/6/1998
From: St. Matthews SC USA
Status: offline

 
RE: Don't open new windows (tutorial) - 8/11/2004 10:48:41   
I do think there are some valid reasons to use target=_blank. I know that this attribute is not going to be part of xhtml, but that doesn't mean future browsers won't suppor it. Code as popular as target=_blank get a free pass with browsers regardless of what the w3c says. NN6 tried not supporting invalid code. Most designers thought that was going to be great. The problem is that most sites on the Net are not valid code. Consumers didn't care about the w3c. They cared about seeing their favorite sites.

The lesson learned was that standards support is a good thing, but backwards compatability is too. The 2 do not have to be mutually exclusive.

One thing that may be advisable is to let your user know in the text of the hyperlink that a new window will be opened.

I have been in meetings for big sites where the target=_blank issue was a major debate. The thing is that there are some situations where you get usability issues either way you go.

If you have a large list of links outside your domain then I've watched usability tests where users get confused about where they are and either forget how to go back or forget completely what they were doing on the site at issue. Opening other sites in new windows can address that to some degree. The problem I have witnessed there is that most folks on lower res monitors are viewing with their browser window at full screen. The new window comes up, and they don't know it's there. They try using the back button, and it doesn't work. They get frustrated, but they do usually discover the main site when they close the browser window. Some site owners consider that to be the lesser of 2 evils. There are times when I agree.

I think "never" is a strong word when dealing with web design. There are times when breaking the rules is the best thing you can do. It is, however, important to know why the rules are there and to have very specific reasons for breaking them.

(in reply to Webnauts)
Webnauts

 

Posts: 38
Joined: 8/8/2004
Status: offline

 
RE: Don't open new windows (tutorial) - 8/11/2004 11:58:13   
Thomas did you read my last post in this thread?

(in reply to Thomas Brunt)
Thomas Brunt

 

Posts: 6109
Joined: 6/6/1998
From: St. Matthews SC USA
Status: offline

 
RE: Don't open new windows (tutorial) - 8/11/2004 14:13:42   
I did read it. I felt that I had something to add.

The main point I want to make is that designing for strict xhtml is nice (for some good reasons,) but it's not a life and death matter for many web sites.

I do believe that many site owners will continue to demand (for some good reasons) that links out of their sites open in new windows. Designers will have no choice but to find a way to satisfy their clients on this issue even if that means leaving the boundaries of w3c compliance.

t

< Message edited by Thomas Brunt -- 8/11/2004 14:20:50 >

(in reply to Webnauts)
skrile

 

Posts: 59
Joined: 1/28/2002
From: Novi MI USA
Status: offline

 
RE: Don't open new windows (tutorial) - 8/11/2004 14:26:10   
Imagine my surprise when I clicked "Reply" only to find a new window being spawned...!

:)

_____________________________

Steve Krile
Ergonomist posing as web developer - or visa versa

(in reply to Thomas Brunt)
Webnauts

 

Posts: 38
Joined: 8/8/2004
Status: offline

 
RE: Don't open new windows (tutorial) - 8/11/2004 14:35:46   
quote:

ORIGINAL: skrile

Imagine my surprise when I clicked "Reply" only to find a new window being spawned...!

:)


Me too! :)

(in reply to skrile)
Numbers

 

Posts: 5
From: Pittsburgh, Pa, Allegheny
Status: offline

 
RE: Don't open new windows (tutorial) - 8/11/2004 14:40:11   
Thanks for your advice. I've just started learning XHTML and agree that the stricter coding rules make good sense.

I always include the statement "Close this window to return to form" on confirmation pages to help customers get back. The FP2000 default confirmation page uses a return link which at times creates a page not found error.

(in reply to Thomas Brunt)
Thomas Brunt

 

Posts: 6109
Joined: 6/6/1998
From: St. Matthews SC USA
Status: offline

 
RE: Don't open new windows (tutorial) - 8/12/2004 15:21:52   
quote:

Imagine my surprise when I clicked "Reply" only to find a new window being spawned...!


You decide whteher or not the reply button spawns a new window in your profile.

t

(in reply to skrile)
demonceau

 

Posts: 4
Joined: 8/16/2004
Status: offline

 
RE: Don't open new windows (tutorial) - 8/17/2004 3:49:44   
The how come all links on this tutorial open new windows ? Do as I say, not as I do ?

(in reply to slbergh)
Giomanach

 

Posts: 6090
Joined: 11/19/2003
From: England
Status: offline

 
RE: Don't open new windows (tutorial) - 8/17/2004 3:54:41   
quote:

The how come all links on this tutorial open new windows ? Do as I say, not as I do ?

Default forum settings, this can be changed, however, the forum has been designed this way to allow for ease of navigation.

_____________________________




(in reply to demonceau)
Numbers

 

Posts: 5
From: Pittsburgh, Pa, Allegheny
Status: offline

 
RE: Don't open new windows (tutorial) - 8/17/2004 4:38:12   
What about Java Applets, are you also discouraging their use on webpages?




quote:

ORIGINAL: Webnauts

Actually you should not force links to open in a new window or popups (such as with the "target" attribute or with JavaScript).

As you might know, JavaScript is not supported by all browsers and some users disable it. When JavaScript is used, it should not be relied upon.
In such cases you will disable your visitor to access your content.

You should avoid as far as possible implementing JavaScript, to avoid running risks on complications on the end users machines, or while goverment and other employees are required to disable this feature, for security or other reasons. Also there is a number of users who are very concerned about security issues and disable this feature too.

The issue here is not only concerning users disabling JavaScript in their browsers. How many do so? 8%?

(in reply to Webnauts)
Numbers

 

Posts: 5
From: Pittsburgh, Pa, Allegheny
Status: offline

 
RE: Don't open new windows (tutorial) - 8/17/2004 4:54:35   
One target for all links
This example demonstrates how to use the base tag to let all the links on a page open in a new window.

http://www.w3schools.com/html/html_head.asp

(in reply to Numbers)
Webnauts

 

Posts: 38
Joined: 8/8/2004
Status: offline

 
RE: Don't open new windows (tutorial) - 8/17/2004 15:11:03   
Numbers sure you can use applets, if their are accessible.
Here you can find it how to make them accessible: http://trace.wisc.edu/world/java/java.htm

(in reply to Numbers)
Webnauts

 

Posts: 38
Joined: 8/8/2004
Status: offline

 
RE: Don't open new windows (tutorial) - 8/18/2004 1:31:00   
quote:

ORIGINAL: Numbers

One target for all links
This example demonstrates how to use the base tag to let all the links on a page open in a new window.

http://www.w3schools.com/html/html_head.asp


Does this validate in XHTML 1.1 Strict?

(in reply to Numbers)
Numbers

 

Posts: 5
From: Pittsburgh, Pa, Allegheny
Status: offline

 
RE: Don't open new windows (tutorial) - 8/18/2004 7:00:13   
Does this validate in XHTML 1.1 Strict?
[/quote]


Validate your XHTML files with W3C
An XHTML document is validated against a Document Type Definition (DTD).

You can read more about XHTML validation in our XHTML tutorial.

http://www.w3schools.com/site/site_validate.asp

(in reply to Webnauts)
dpf

 

Posts: 7121
Joined: 11/12/2003
From: India-napolis
Status: offline

 
RE: Don't open new windows (tutorial) - 8/18/2004 7:53:24   
quote:

What about Java Applets, are you also discouraging their use on webpages

java can be turned off also.

_____________________________

Dan

(in reply to Numbers)
Webnauts

 

Posts: 38
Joined: 8/8/2004
Status: offline

 
RE: Don't open new windows (tutorial) - 8/18/2004 16:45:10   
Yes! Java can be turned off. But that is why you should use an alternative for these cases.
Then you are accessible, or?

(in reply to dpf)
pageoneresults

 

Posts: 1001
From: Orange, CA USA
Status: offline

 
RE: Don't open new windows (tutorial) - 8/24/2004 9:16:16   
The best thing to do at this point is start thinking about moving forward. Spawning new windows on users is a usability no-no. I stopped using the target attribute a couple of years ago. Instead, I may place a small instruction next to a link like this...

Shift + Click to Open Link in New Window

That solves most of the issues.

Remember, some users are still on older systems. Spawning new windows is a drain on their system resources. Many new users to the Internet may mistake your spawned window as a popup and leave your site immediately.

The other thing to keep in mind. Each time you open a new browser window, you take away system resources. When the browser window is closed, those resources are given back minus a little bit. Each time that new window opens and closes, system resources are affected. After a while, a system defrag is in order to put those resources back in their proper place.

_____________________________

SEO Consultants Directory
Find Search Engine Marketing Companies

(in reply to Webnauts)
Page:   [1] 2   next >   >>

All Forums >> Community >> OutFront Discoveries >> Don't open new windows (tutorial)
Page: [1] 2   next >   >>
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts