Re: place-holding characters in form elements

tell the user to destroy the text.  No java script is needed.

----- Original Message -----
From: "Jon Hanna" <jon@spin.ie>
To: <w3c-wai-ig@w3.org>
Sent: Thursday, May 23, 2002 6:01 AM
Subject: RE: place-holding characters in form elements


It is
> highly likely
> that some user will not delete but just type in the box either
> after, before
> or in the middle of the default text. This will cause huge
> problems for any
> form data that is inserted into databases unless we do some server
side
> validation and character stripping from strings.

This can be easy, if you can use default text that is guaranteed to be
invalid - e.g. non-numeric data in a numeric field. It is a problem
though.

> If the user tabs to the text area it seems that the default text is
> highlighted and then overtyped but how can I make this happen with
someone
> who uses a mouse (without resorting to client side javascript).

I'm afraid javascript is the only way to do this in most browsers AFAIK.
On
the bright side it is a relatively easy piece of script to write in a
manner
that degrades well to non-javascript user-agents.

Received on Thursday, 23 May 2002 08:09:58 UTC