It amazes me that systems that cost millions of dollars to develop, are rendered unusable due
to such fundamental errors in the user interface.
The oddest (sadest) thing about this example is that
they used javascript to implement the pop-up window - meaning they had at their disposal
a very simple means of giving the error message window visibility (or "focus"),
as shown below.
Opening a new window and giving it focus
After a little research I found that what I wanted was to use javascript to do the
window opening and give that window focus. [I also found out that
not everyone uses javascript - or at least not everyone has it "switched on" but I
eventually came to the conclusion that most of my surfers would have it set on by default.)
So I diligently went about changing all my links to
<a href="javascript:harrysWindow ('http://blahdeblah.com/')" etc>.
I then started to use the same technique on my business site (with informational pop-up
windows)... and then discovered that search engine robots do not follow links embedded in javascript
commands!
This can easily be overcome by putting in a site map, which also adds to human
usability. However, a site map does not
necessarily provide anchor text links (a nice to have). Also, some pop-up window blockers
do not allow a window to be opened like this (directly from the "href" part of the link).
Opening a new window, giving it focus and having a robot friendly text link
I then discovered that I could combine the two techniques.
The result is as follows:
<a href='http://blahdeblah.com/'
target="harrysWindow"
onclick="javascript:harrysPopup()">
If you want to see the code that goes into the harrysPopup javascript, have a look
at the source of this page (replacing the words
"bpNetPop" with "harrysWindow"; and
"pu" with "harrysPopup").
All external links
in this tutorial reuse the same window (in other words the following link is an example).
You will need to refer to a javascript reference manual for more details
on the specific options, especially on the window.open command.
Navigating users to my real site from a pop-up window
I then realised that if surfers came in on my menu-less informational pop-up windows, they
had no way of navigating to my real site. Bummer - a potential customer lost.
Without going into tons of detail, I devised a way (using javascript again)
to provide a common, standard menu in the pop-up window that worked differently depending
on how the surfer got there.
Simply, if they arrived from outside my site, the menu allowed them to navigate around
my site as per normal. However, if they arrived at this page as a pop-up window then clicking on the
menu would take them back to the original window and send them to the requested page.
At the risk of sounding immodest, it was one of the most satisfying things I have ever done
on a website. One of the funniest / sadest things about it
is that no-one should ever notice that it's there (that's the whole point in
having it!) The trick is simply in that the pop-up window I create has a specific name (harrysWindow),
whereas if they come in from a search engine, it has no name. The menu behaves differently
on that basis. [I'll leave you to explore my site to find out where it exists.]
So what did I find out?
Firstly, Javascript has nothing to do with Java (and Java has nothing to do with coffee
- but that's another story).
There are thousands of javascript tutorials with lots of free scripts (and excellent examples
of pop-up and pop-under windows aplenty - what better place to find the most insiduous forms
of javascript annoyances than a javascript geeks' site!).
Not all javascript is created equal (but then it's more equal than html in many respects).
Not all browsers support javascript (but this is largely irrelavent depending on your
audience).
Most search engine robots do not follow javascript links embedded on the "href"
portion of an anchor link.
|