Submit Your Article Forum Rules

Page 1 of 6 123 ... LastLast
Results 1 to 10 of 58

Thread: Don't open new windows!

  1. #1
    WebProWorld MVP Webnauts's Avatar
    Join Date
    Aug 2003
    Location
    European Community
    Posts
    9,028

    Don't open new windows!

    Tutorial Revised!!!

    Please click here:


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

    Changing the current window or popping up new windows can be very disorienting to users who cannot see that this has happened.

    As you might also know, JavaScript is not supported by all browsers and some users disable it. When JavaScript is used, it should not be relied upon.

    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:

    European Year of People with Disabilities 2003 (new window)

    If you want to build an accessible pop-up window, add the code below within the head tags of your HTML document:


    <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,wi dth="+strWidth+",height="+strHeight+",left=0,top=0 ";
    newWindow = window.open(url, 'newWin', tools);
    newWindow.focus();
    }
    </script>

    Above script source: http://www.accessify.com

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

    Web Accessibility Initiative (WAI)

    Example see here: http://www.webnauts.net/popup.html

    Test this turning off JavaScript to see how it works!


    Further reading:

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

    If you still have questions, please feel free to post them.[/code]

  2. #2
    Senior Member JayDrake's Avatar
    Join Date
    Jul 2003
    Posts
    177

    Opening new windows?

    Hmm... I disagree. There are instances where opening a new window makes perfect sense, and explicitly warning users is, by and large, unnecessary. Target is entirely non-existant in XHTML Strict, not just _blank, though this is not the case with XHTML Transitional. Unfortunately, most cases where you would really have good reason to open a new window, control over the details of the window is important and you will need to do so using javascript.

    In some instances visitors will have javascript disabled or they may have a 'popup blocker' which will not allow new windows to be opened, which may or may not be the most desirable way of dealing with popups. (IMHO requests for new windows should open and unrequested windows should not, or if you click on a javascript link to open a new window that window should open, but if a window is to open when you load a page, the blocker should stop it.)

  3. #3
    WebProWorld MVP Webnauts's Avatar
    Join Date
    Aug 2003
    Location
    European Community
    Posts
    9,028
    JayDrake!

    If a user's browser doesn't support JavaScript, or the JavaScripts you are using, or if user has JavaScript OFF, will disable your visitor to access your content.

    That is why you should avoid as far as possible 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.

  4. #4
    Senior Member JayDrake's Avatar
    Join Date
    Jul 2003
    Posts
    177

    Disabling javascript

    What percentage of users have javascript disabled?

    I do a couple of things here. First checking browser usage and checking to see that the majority of the browsers that visit the site have javascript enabled by default. (Noting that experience shows that the average web visitor does not modify this setting.) I also maintain a fairly basic script which resides on pages that make use of javascript, testing each visitor to see if javascript is enabled or not and recording the results. Should a page that is using javascript, for the purpose of opening a window or others, shows that more than 20% of the traffic is not using javascript, more consideration in it's use is necessary. Presently the average on such pages for me shows 96% of to have javascript enabled. In fact, none of the pages show more than 8% as having disabled javascript.

    I would hazard a guess that the majority of those few who do have javascript enabled will recognize the need to enable javascript in order to open a window and can do so if they feel the information they are trying to access is important enough.

    I'm not a huge fan of javascript myself, seeing it overused in entirely too many places, but sometimes it simply makes sense. Up until recently, for instance, I had a 'tour' of PlanHouse Gallery on our site which opened an appropriately sized window and allowed you to navigate forward and back through a series of photos. This could have been done in any sized browser window, with or without scrollbars, but was much more appealing when sized specifically to fit the photos and interface.

    Incidentally, during the 3 months that the 'tour' was available 100% of the 12,643 visitors who viewed the page had javascript enabled and a total of 8,322 visitors clicked through to the 'tour' viewing, on average 10/12 photos.

  5. #5
    Hi there,
    I have to fully agree whith what JayDrake said.
    The use of Javascript and pop up windows is still necessary, and there is no need to "warn" the visitor that there will be such pop up or new window. It is also true that javascript and pop up have been used too much, and is stil (unfortunately) used for adds and/or as a condition to have ones web site listed in some search engines.
    When do you want to open a new window? Anytime you give the possibility to your visitor to access some information on another site. What would be the benefit to me if on my home page for example, a link to another web site would cause the visitor to leave and not come back? What about the reciprocal links? You want the visitor to be able to visit them, but you also want him to come back. So once he is done , and closes the "new window", your page is still in front of him.
    Pop ups: if an information on your page is just a few sentences, why change page? A pop up window that fits perfectly the text or image is just fine, it is read or viewed rapidly, and the internaut comes back to the main source immediately instead of hitting the "back" button.
    I do use these pop ups for virtual tours, and believe me, visitors tend to view these tours more than many other pages, because they know that what they will see is a "concentrate" of the information they are looking for.
    So pop ups that are directly related to, and comming from, your web, yes. pop ups that are imposed by another web or that are an add, these are a pain,and should be banned...
    Cordially,
    Alain
    http://www.aventurevoyages.com

  6. #6
    WebProWorld MVP Webnauts's Avatar
    Join Date
    Aug 2003
    Location
    European Community
    Posts
    9,028
    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? How much percent are they?

    My collegue Jakob Nielsen say's about this:

    "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

    By the way, can someone tell what is coming up with XHTML 2.0? I did not look in this issue yet...

  7. #7
    Senior Member JayDrake's Avatar
    Join Date
    Jul 2003
    Posts
    177
    Yay! Let's gang up on the moderator! (Just kidding!) Seriously, though...

    Quote Originally Posted by aventvoy
    When do you want to open a new window? Anytime you give the possibility to your visitor to access some information on another site. What would be the benefit to me if on my home page for example, a link to another web site would cause the visitor to leave and not come back?
    In this particular case I would use the target attribute and have the page using the target attribute be set as XHTML Transitional rather than Strict. Your only need here is to open another window and the only consideration here is that you're letting spiders crawl along this link to the other person's site which might help them out some. I figure that if I'm referencing another site, they deserve that sort of credit. I'd certainly be happy to receive the same.

    Quote Originally Posted by aventvoy
    Pop ups: if an information on your page is just a few sentences, why change page? A pop up window that fits perfectly the text or image is just fine, it is read or viewed rapidly, and the internaut comes back to the main source immediately instead of hitting the "back" button.
    Yup. A really good example is a help system whereby you educate your users that when they see a help icon they can click on it for more information. I use these alot in forms, especially where there is possible uncertainty as to what is expected to be put in a given field. As for the back button, it's evil. It's particularly evil in framed sites (which I dislike for many other reasons anyway) and can also be troublesome for some dynamic sites, requiring your visitor to first hit back and then refresh. I try to keep my visitors from needing to do anything of the sort.

  8. #8
    Senior Member JayDrake's Avatar
    Join Date
    Jul 2003
    Posts
    177
    Quote Originally Posted by Webnauts
    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? How much percent are they?
    Ahh... what about these users, indeed! If I'm designing a site for cell phone users, there are a completely different set of rules I would need follow. I'm not, however, and I've yet to see such a user recorded in any of my statistics.

    As for those with disabilities, this is being very well addressed in the CSS community. (As are a number of other 'media' issues such as print and even the aforementioned cell phones.) Cold as it may sound, however, unless these visitors reach a percentage of the visitors that would give good return, they will be considered in the same way as those who use text based or non-compliant browsers. A minority for whom the work to market to them is not worth the gain from doing so.

    I would consider this not to be so in the case of sites which are more informative in nature rather than commercial.

    Quote Originally Posted by Webnauts
    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.
    This makes a great number of assumptions, mostly about user's experience and understanding of the browser they use. Working with users in businesses who use their computer and web browser all the time, I find that very few would know to right click on a link, let alone to open it in a new window or even have considered that they might want to for some reason. Those who do are experienced enough not to be disoriented by something as simple as a 400x300 pixel window with no scrollbars opening to present them with information. Such a window should surely be well presented, and I personally make a point to always include a 'close this window' link on my windows and recommend the same for others.

    Quote Originally Posted by Webnauts
    Users deserve to control their own destiny. Computers that behave consistently empower people by letting them use their own tools and wield them accurately."
    I only see this as true to a certain extent. Yes, users should not be bombarded with popups that won't stop. No, users should never be trapped and forced to close out their browser in order to get away from a page. But these things should be obvious anyway. Javascript should be used, but to enhance rather than detract from a user's experience. It is preferred that other tools be used when possible, but for some things, javascript is the correct tool.

  9. #9
    WebProWorld MVP Webnauts's Avatar
    Join Date
    Aug 2003
    Location
    European Community
    Posts
    9,028

    Here again!

    Well do be more specific, 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?

  10. #10
    Senior Member JayDrake's Avatar
    Join Date
    Jul 2003
    Posts
    177

    Re: Here again!

    Quote Originally Posted by Webnauts
    Well do be more specific, 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.
    I don't even know what to say to this other than why is it that all the many magazines published in this country aren't forced to publish large text format or audio versions of their productions in order not to discriminate against potential subscribers? The answer is that it is not discriminatory. Similarly, one needn't publish one's site in every written language that is spoken in the United States, and I'm sure a great number of other things could be considered in the same way.

    Quote Originally Posted by Webnauts
    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.
    Each of these are addressed in comparing statistics to revenue streams. Business is not about pleasing everybody. It's about making money. I myself am a linux user because I like the freedom that comes with it, and were I creating sites solely for my own use I would do so to suit Firebird, my browser of choice, as 100% of my traffic would be using that browser. As I cannot please everyone, however, I look to my statistics to show me how I can best please the majority, and I'm sorry if what I do annoys, troubles or even at times discludes a small percentage of visitors, but the battle of fact and feeling should always be won by fact in business.

Page 1 of 6 123 ... LastLast

Similar Threads

  1. Pop-up windows will not open...!
    By dwjonasen in forum Graphics & Design Discussion Forum
    Replies: 2
    Last Post: 03-18-2008, 07:27 PM
  2. Open source threat to Windows
    By WPW_Feedbot in forum IT Discussion Forum
    Replies: 0
    Last Post: 02-09-2005, 09:30 AM
  3. How good are the open source Windows apps?
    By WPW_Feedbot in forum IT Discussion Forum
    Replies: 0
    Last Post: 02-07-2005, 11:30 PM
  4. How good the open source Windows apps?
    By WPW_Feedbot in forum IT Discussion Forum
    Replies: 0
    Last Post: 02-07-2005, 09:31 PM
  5. Evaluating open source Windows
    By WPW_Feedbot in forum IT Discussion Forum
    Replies: 0
    Last Post: 01-26-2005, 10:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •