> Am I running any risk with a page that
*depends* on javascript for informative pop-up
windows?
As others have said it is best to not depend on Javascript and things
like
<a href="foo" onclick="openfoowindow(); return false;">...
mean that you can normally offer a fallback with little pain. Also
look up <NOSCRIPT> if you don't know about it. I have this:
<noscript>
<link rel="stylesheet" type="text/css" src="noscript.css">
</noscript>
in the header, which allows me to display:none the bits of the page
that rely on scripts. Note that this NOT legitimate HTML but either
works or is ignored by all the browsers that I've seen. (Any comments
anyone?)
How many of your visitors will be inconvenienced because you reply on
Javascript does depend on the type of site that it is and the
demographics of the visitors. By coincidence this morning I have been
plotting some graphs of this sort of thing for one of my sites and I've
been suprised to find that not a single user has Javascript disabled!
It's well worth doing a study like this because the results might not
be what you were expecting or what others told you. For example,
although the effort that I've put into making the site work when JS is
disabled may be partly wasted[*], I've also found that users have much
smaller screens than I expected. Only a tiny fraction seem to have a
1280x1024 monitor (and practically all of them are Mac users) with more
than a third using a window smaller than 900x500! Of course the site
is fluid enough to work in these small windows, but they weren't what I
had in mind when I designed it. Your visitors will probably be
different, so I encourage you to measure them.
[*] Of course the largest category of visitors who don't have JS
enabled are search engines, and making sure that they can reach all of
the content is important.
<RANT>As for pop-up windows, forget them. In the way that spam has
ruined email, popups are ruined by their use for advertising. Don't
design a site that relies on users doing things by email: too many of
them will give bogus email addresses because they're afraid of spam, or
they'll have whitelist-based filtering so your message (containing
their new password for your site or whatever) will never reach them, or
it will reach them but they'll have forgotten that they signed up and
report you to someone who'll blacklist you. The same applies to
popups: you may think that a popup is the right thing to use, and I
might agree in principle, but the whole concept is now so tarnished in
users' minds that you might as well be selling penis-pills. Your
friendly popup message saying "Are you sure you want to close, you
haven't saved it?" will get trapped and converted into "THIS NASTY SITE
TRIED TO OPEN AN OBNOXIOUS ADVERT FOR PENIS PILLS WOULD YOU LIKE TO
COMPLAIN ABOUT THEM TO THE FTC???" by the user's browser.
Aaarrrgghh!!!!</RANT>
--Phil.