WebMaster icon, Lecture 4

Form Basics

Check out how Forms work

INPUT Tag

Type Attribute

Text
Password
Checkbox
Radio
Submit
Reset

SELECT Tag

TEXTAREA Tag

Submission Method (GET, POST)


Prev | Next | Improving Your Home Page with Tables, Backgrounds, CGIs, Counters


One of the best ways to make the web more interactive is by using forms. By their very nature, forms require some cgi program to send the data to.

The INPUT tag allows a browser to input data into a form. There are several types of input fields:

"text" allows the entry of text in a text box (this is the default):
"password" (text entry field; entered characters are represented as asterisks):

"checkbox" (a single toggle button; on or off):

koch
"radio" (a single toggle button; on or off; other toggles with the same NAME are grouped into "one of many" behavior):
koch

"submit" (a pushbutton that causes the current form to be packaged up into a query URL and sent to a remote server):

"reset" (a pushbutton that causes the various input elements in the form to be reset to their default values):

Popup menus are implemented with the SELECT tag:

Larger text areas are implemented with the TEXTAREA tag:

GET takes the data from the form and adds it after the URL specified. This ends up looking like a query request to the URL specified. POST just sends the data to the URL without the actual reference in it. You can use the "mailto:" and an email address to have the data from a form mailed to you:

<FORM ACTION="mailto:koch@wilkes.edu";><INPUT TYPE="TEXT" NAME="QUESTION"></FORM>

This would mail the text field to me. It would have "QUESTION=" in front of whatever they typed.


Prev | Next | Improving Your Home Page with Tables, Backgrounds, CGIs, Counters


'The WebMaster Speaks....' 4-4

Webmaster Lectures
Welcome to a series of lectures on the World Wide Web
Home | Lectures overview | Lecture 1 | Lecture 2 | Lecture 3 | Lecture 4 | Lecture 5 | Lecture 6 | Lecture 7 | Lecture 8



Membership

Login





Last update: Tuesday, July 11, 2000 at 9:23:08 PM.
Go to John Koch's home page or send him a message.