![]() |
|
![]() |
Text Version
Books & Music Career Computers Education Family Food & Wine Health & Fitness Hobbies & Crafts Home & Garden Money News & Politics Relationships Religion & Spirituality Sports Travel & Culture TV & Movies ![]()
![]()
![]()
|
![]() |
![]() Clearing a Form FieldMany uses of ASP involve forms, to process information from your users. Here's the super-easy way to have a prompt in a form field, but to have it vanish when the user clicks to type. The most common application of this is with email addresses. You want the field to normally say something like "enter email here" so that the user knows that is what the field is for. However, that can easily result in you getting subscriptions to addresses like enter email herejoesmith@aol.com which is annoying. It's really easy to fix this. Let's say your field currently says: <input type="text" name="email" size=30> All you have to do is add an onClick command to it, that tells the system - when a user clicks, do something. The "something" you want to do is make this field blank. Therefore: <input type="text" name="email" size=30 onClick="this.value=''"> That's all there is to it!
![]()
Content copyright © 2015 by Lisa Shea. All rights reserved.
This content was written by Lisa Shea. If you wish to use this content in any manner, you need written permission. Contact Lisa Shea for details.
|
![]() |
![]()
![]() ![]()
|
![]() |
| About BellaOnline | Privacy Policy | Advertising | Become an Editor | Website copyright © 2016
Minerva WebWorks LLC. All rights reserved.
|