Forms allow readers of your Web page to send you
information. You can create forms that send you email, forms that search
a database, forms that add information to a database, and more.
Choosing a form handler
Forms work by running a program
on a Web server. So, to create a usable form, you either have to know how
to program or use a program that someone else wrote.
In AOLpress, the location of the program you want to run is called the Form
Handler Location. Since you haven't created a program yet, we'll use
the program WebCrawler uses to help you search the Web. To run someone else's
program, you create fields that match the ones in the form normally used
to run the program. The WebCrawler program is located at:
http://www.webcrawler.com/cgi-bin/WebQuery.
-
Place your cursor in the space to the right.
-
Select
FormatForm.
In the window that asks for a Form Handler Location, type the location
of the WebCrawler program exactly as shown above.
-
Choose POST as the Method. (This controls how values in the fields
get sent to the program. Ask the creator of your program if you don't know
which to use.)
-
Click OK. Notice that you see two dashed lines. These lines are the
boundaries of the form. In addition, a toolbox with several icons for creating
fields appears.
-
Click the Text icon in the toolbox. In the Text Field window that
appears, type "searchText" as the Form Tag. You can change
the Display Size to make the field wider if you like.
-
Click OK to create the text field. This is where you will type your
WebCrawler search text.
-
Click the Submit icon in the toolbox.
-
Change the Button Label to "WebCrawler Search" and click
OK.
Try it here:
Now your form is ready to use!
Try typing some keywords you want to search for on the Web. Then, click the
"WebCrawler" button. You should see the WebCrawler search results. Click
the
icon to return to this page.
If you are a PrimeHost customer, see the
PrimeHost
Getting Started Guide and the
PrimeHost FAQ for information
about the form handlers provided with your PrimeHost account.
If you are an AOL member, see the AOL
Web Administrator's
page for information about the form handlers provided with your AOL
membership.
Adding a selection list
A selection list lets you pull
down a list and select the option you want. Here we'll add a selection list
that lets you control how many matches WebCrawler sends.
-
Put your cursor to the right of the line that says "Number to find".
-
Click the Slist icon in the toolbox.
-
Type "maxHits" in the Form Tag field.
-
Change the Display field to 3 lines.
-
Now, type a number of matches you might want the search to find in the
Elements area (for example, 10). Click the Add button to add
the number to the list.
-
Add several more numbers to the list (for example, 5 and 20). You can change
the order of the numbers by using the Up and Down buttons.
-
Click OK to create the selection field. (Unless you put a check in
the Select box for an entry, you'll see a message that says "Nothing
is selected". Click Yes to make the first choice the default selection
in your form.)
-
Test your form by typing some text to search for, selecting a number of matches,
and clicking the WebCrawler Search button.
Try it here:
For more information about creating forms, see
the chapter on
forms in the AOLpress
User's Guide. For information about creating programs to use with your forms,
you can read the
AOLserver
documentation.
In the
next lesson you'll learn how to create
frames to divide your page into separate regions. Don't forget to choose
FileSave
to save your changes to this page.
HomeTOCNextGlossaryIndex
[
Home |
Contents |
Previous |
Up a Level |
Next |
Glossary |
Index ]
Copyright © 1997 America Online, Inc.
©2025 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Questions?<A HREF="http://techref.massmind.org/techref/language/html/HELP/tutorial/forms.htm"> AOLpress: Creating forms</A>
.