On Wed, 15 Nov 2006, Cheryl Hewitt wrote:
> Riva,
>
> Try this: <input type="text" size="30" maxsize="100" value="Name"
> name="NameField" onfocus="if (this.value == 'Name'){this.value = '';}" >
>
> -Cheryl
Cheryl beat me to it - I was going to suggest only clearing the box if the
value is still the 'default' value - you don't want to clobbber the user's
input if they put focus back into the box again!
(And using this.value rather than explicitly naming the element as
document.formname.fieldname.value is much cleaner :)
Cheers
Dave P
http://www.preshweb.co.uk/
http://wiki.preshweb.co.uk/
____ The WDVL Discussion List from WDVL.COM ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk
________________ http://www.wdvl.com _______________________
You are currently subscribed to wdvltalk as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016
Please include the email address which you have been contacted with.