(hhservices) wrote:
> My question pertains to a contact form where someone would type their
> phone number. Example:
> <input type="text" name="Phone" size="30" value="(include area code)">
That's not a good approach, since the value attribute, if present, should
specify a useful initial (default) value for the field.
> The type of input that I am searching for is when the page is viewed
> then words (include area code) would be visible in the form and then
> when someone clicks the input box, then the words include area code
> would disappear and then they could type their phone number with the
> area code.
You could do that, with the usual caveats, using a simple piece of
JavaScript. But it is better to avoid creating the problem in the first
place. Use something like
<div>Please specify your full phone number, including area code.</div>
<div><label for="phone">Phone:</label>
<input type="text" id="phone" name="Phone" size="30"></div>
--
Yucca,
http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring:
http://www.cs.tut.fi/~jkorpela/www.html