
Originally Posted by
hooloovoo
Everyone says that javascript menus are evil because they block out a lot of your users, right?
With typical implementations, yes. They also block what some might consider the most important of visitors: search engine robots. The other problem with interactive menus is that they can contain too much information: a menu shouldn't me a site map.
Notice that I said "typical implementations". A menu doesn't have to be evil and inaccessible, it just so happens that the vast majority are, including those at Dynamic Drive (among other script collection sites). It is entirely possible to produce one which provides sensible navigation no matter what user agent is used (I should get back to mine
), but not many exist in the wild.
[M]y solution is to figure out a way to check for javascript first
The problem with scripting user agents isn't limited to whether client-side scripts can be enabled or not, but what is supported when such features are enabled.
A well-written script will probe its host to determine what's available. This should be done on a one-to-one basis. That is, test for each method or property needed. Unfortunately, many scripts either fail to do this at all, or make rather unfounded assumptions. For example,
Code:
var has_dom = !!document.getElementById;
would be nonsense. Just because a host happens to have a getElementById property on the document object doesn't mean that it supports the entire W3C DOM. Whilst such assumptions have some truth in the most common cases, it is not universal.
[...] if javascript is not enabled, to come up with a message (alert box or something) that explains how to turn it on and why.
What if they have no control over the settings (can easily be the case in the workplace or public library)? What if their user agent simply isn't capable (using an old browser or a portable device)? What if they just don't want to (it is their machine, after all)? The point is, you can't control the environment and you don't have the right to tell visitors how to browse. If you start doing that, you'll lose your audience. It's as simple as that.
From my perspective, you have three choices:
- Use an inaccessible menu and face the consequences.
- Use one of those rare, accessible menus.
- Abandon the idea and go for a more conventional navigation approach.
As far as (2) is concerned, the only such menus I can point to at the moment are from the now defunct DevEdge website. I have some misgivings over the systems shown there (notice the links to other sites) as they use some browser detection which is a Bad Thing, but they're about the best I'm aware of for the moment.
Mike
Bookmarks