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 05:54:11 UTC