ASP Is Fun

Learning ASP
Free Course
Basics
Functions
SQL Commands
Sample Code


Servers / Setup
Host Reviews
Server Setup
Error Tips


Contract ASP
Development

Search For:


Intro to ASP


 


Auto Fill In Web Field Forms



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.

ASP Form Creation and Security

Bookmark this site so you can reference it any time you have ASP questions in the future!




ASP Main Page | ASP Ebooks | Free ASP Course | Contact Lisa
All content copyright Đ 2012 Minerva WebWorks LLC. All rights reserved.

Italian Wedding


Free Newsletter!

Ebooks
Intro to ASP
ASP SQL DB
Members
Shopping


Introduction to ASP

Romance Tips
Irish Romance
Italian Romance
French Romance

ASP Poll
How do you handle 500 errors?
I don't
Page does nothing
Displays error
Emails error