W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > April to June 2002

RE: place-holding characters in form elements

From: Jon Hanna <jon@spin.ie>
Date: Thu, 23 May 2002 11:01:20 +0100
To: <w3c-wai-ig@w3.org>
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 05:54:11 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 13 October 2015 16:21:19 UTC