Pop-up Windows [Part 1]

It was supposed to enhance usability. Allowing web designers to open new browser windows with script would encourage flexible, dynamic sites working across multiple windows. The web would be freed from its original, static page paradigm. It would make the net a better place. But, as anyone who experienced the ensuing cascade of advertisements will tell you, the pop-up window had quite the opposite effect.

In the next two articles we’ll discuss (1) the background to the pop-up window and some of their common variants, and (2) their accessibility/usability issues, and their future.

Pop-up windows quickly became the scourge of the internet, almost as reviled as e-mail spam. Nothing illustrates the special contempt reserved for the pop-up window more dramatically than the fact that the major browsers, not normally known for their willingness to act in unison, all incorporated pop-up-blocking features in the last few years. These blockers work mainly by intercepting the Javascript command that creates a new window, and so far they have worked so well that they have effectively ended the reign of the pop-up window. Writing in 2004, Richard Cornford summed it up:

“It is probably best to accept that the pop-up window is no longer a viable option in Internet scripting and consider what can be done as an alternative.”

Background

The scripted pop-up window was invented as a tool which could, if used appropriately, lend flexibility to a web site. Computer users were familiar with the multiple-windows interface of most operating systems, and it was assumed that this model would also be successful on the web. Some websites had certain features, for example image galleries or temporary surveys, which could be implemented with much less hassle when the designer was allowed to create and manipulate multiple windows through Javascript. (This still holds true today - but with the advent of AJAX and advanced DHTML we now have many more tools at our disposal). At the time, many designers made use of pop-up windows to genuinely improve their user experiences. Unfortunately, they also proved to be ideal tools for unscrupulous developers to push advertisement after advertisement at us. The level of control that Javascript provides over these windows enables them to perform obtrusive functions like loading automatically and spawning new windows upon being closed.

Types of Pop-ups

Target=”_blank”

The original, script-less pop-up window, this technique involves adding an attribute to a hyperlink to instruct it to open in a new window. Because this method does not make use of Javascript, and requires direct and specific action by the user (clicking on the link) it is generally considered more accessible and user-friendly than the scripted techniques.

The following example is a link which will open a new pop-up window:

<a xhref="http://www.accessible.ie/myPage.htm" mce_href="http://www.accessible.ie/myPage.htm" target="_blank">link text</a>

Window.open

This approach has been available since Netscape first introduced Javascript 11 years ago. At the core of all script-based window-opening techniques, window.open takes parameters such as the address of the page to open, and the size and appearance of the new window. Javascript gives web designers the option to launch these windows based on events such as pages loading and closing. It is a trivial task to launch an enormous volume of pop-up ads, each one spawning another generation when it is closed. Consequently, this type of pop-up has been most-targeted by pop-up blocking software. The pop-under window (which appears behind the active browser window) is a variation of this type. The following line of code will open the page “myPage.htm” in a 640×480 pixel pop-up window, with all the attributes listed below:

window.open('myPage.htm', 'myWindow', 'location=yes, toolbar=yes, menubar=yes, directories=yes, status=yes, resizable=yes, scrollbars=yes, height=480, width=640', false);

DHTML - floating pop-up

Strictly speaking this is not a true pop-up, as it is actually contained within the structure of another page. However, the features it shares with the traditional pop-up window makes it virtually identical in the eyes of the user.

In its simplest form, this window is made up of a div element, positioned with CSS and activated with Javascript. More extravagant effects such as transparency and animation can be achieved using PNG / GIF images and more scripting. These windows are the marketer’s workaround of choice for the common pop-up blocker. This attitude towards users, regarding “growing consumer control” as a problem to be overcome, is clearly the next step in the mentality of the pop-up pusher.

Although these dynamic pop-ups are not particularly prevalent on the web at the moment, their capacity to cause disruption to the browsing experience whilst evading pop-up blockers is extremely worrying. However, they are unlikely to assume the position once held by the original pop-ups, as any number of them can be quickly removed by closing the containing page. This provides a disincentive for webmasters who would otherwise revert to their old pop-up tactics.

Here is a particularly (in this company’s words) “eye catching” example of a floating ad.

Non-browser pop-ups

These include windows opened by malicious software, and textual messages displayed by Windows’ messenger service. Programs such as “Savenow” and “OfferCompanion” are notorious for duping unwary internet users into installing them, before downloading and displaying a massive number of advertisements.

Once very common on home computers, these have declined significantly since common anti-virus programs started targeting the sort of malware that produces pop-up windows. Microsoft also played a part by disabling the messenger service as of Windows XP service pack 2.

In part 2 we’ll look at some of the usability / accessibility issues surrounding pop-up windows.

Tags: , , ,

Comments are closed.