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
Jokes & Riddles
Astronomy
Philosophy
Public Health
Canadian Culture


dailyclick
All times in EST

Autism Spectrum Disorders: 4:00 PM

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

g

Auto Fill In Web Field Forms
Guest Author - Lisa Shea

Let's say you have a big contract page where you want a person's name to fill into many spots automatically when they type it in once. How do you do that?

First, put a form on the entire page, starting at the top and ending at the bottom. That way you can make calls to anywhere on the page to perform actions.

Next, create an input box where the user can type in their name. You can use:

Full Name:
<input type="text" name="username" size="50" MAXLENGTH="50" onChange="UserName(this.form,this.form.username.value)">

Next, the script called UserName. This is the script that is called any time a change is done to the above field. Put this right above where the form begins.

<SCRIPT LANGUAGE="JavaScript">
<!--
function UserName(form, username) {
form.userplace.value = username
}
// -->
</SCRIPT>

Finally, everywhere in the form where you want the form to fill in the name, use this:



You can do this for multiple fields - just make sure you change the name of the function and the fields in each case.

This site needs an editor - click to learn more!

RSS | Related Articles | Previous Features | Site Map


Content copyright © 2008 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.

Digg! g delicious Save to Del.icio.us

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


vote
Driving Amount
Much more
Slightly more
Slightly less
Much less

g


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


BellaOnline Editor