logo
g Text Version
Auto
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Society & Culture
Sports
Travel & Leisure
TV & Movies

dailyclick
Bored? Games!
Postcards
Astrology
Take a Quiz
Rate My Photo

new
Journals
Folklore and Mythology
Business Coach
Marriage
Senior Living
Ethnic Beauty
Adolescence


dailyclick
All times in EST

Full Schedule
g
g ASP Site
Editor Wanted
BellaOnline's ASP Editor

g

Clearing a Form Field
Guest Author - Lisa Shea

Many 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!

This site needs an editor - click to learn more!

RSS | Related Articles | Previous Features | Site Map

Add Clearing+a+Form+Field to Twitter Add Clearing+a+Form+Field to Facebook Add Clearing+a+Form+Field to MySpace Add Clearing+a+Form+Field to Del.icio.us Digg Clearing+a+Form+Field Add Clearing+a+Form+Field to Yahoo My Web Add Clearing+a+Form+Field to Google Bookmarks Add Clearing+a+Form+Field to Stumbleupon Add Clearing+a+Form+Field to Reddit


Content copyright © 2009 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 BellaOnline Administration for details.

g


For FREE email updates, subscribe to the ASP Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor

g features
Best uses for RSS

RSS and its future.

Force Download Dialog box with ASP

Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter

jobs
what
job title, keywords
where
city, state or zip
jobs by job search


vote
Growing a Garden
Veggies and Flowers
Veggies Only
Flowers Only
No Garden

g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2009 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor