Nguyen Vu
May 21, 2000
COMP 212 - (Wed 6-10)
Leslie Potter
Assignment 7
Due Date: May 24, 2000
HTML Tutorial 6 Forms:
- Read the learning objectives at the beginning of the chapter.
- Draft an outline or map of the chapter main topic and subtopics.
Learn about CGI scripts
Review the various parts of an online form
Create form elements using HTML tags
Create a hidden field on a form
Work with form properties
Learn how to send data from a form to a CGI script
Learn how to send form information without using CGI scripts
- Write answers to these questions.
- Explain the following terms:
CGI Script (p. 6.4) - (Common Gateway Interface) is any program or set of commands running on the Web server that receives data from the Web page and then acts on that data to perform a certain task. An example is when data on a form being sent to the Web server for processing then send back to the Web server.
Field (p. 6.7) - is the element that a user can enter information in on a form.
Field Value (p. 6.7) - is information that is entered into a field.
GET method (p. 6.35) - the default method in which data from a form is "appending it to the end of the URL specified in the ACTION property."
Input Box (p. 6.6) - on a form is for text and numerical input or entry.
Password Field (p. 6.15) - is identical to an input box except that the characters typed by the user are displayed as bullets or asterisks.
POST method (p. 6.35) - the other type of sending the data from the form to the CGI on the web server for processing by sending the information on a separate data stream thus allowing the Web server to receive the data through what is called "standard input".
Selection List (p. 6.17) - is a list box from which the user selects a particular value or set of values, usually by clicking the item or items with a mouse.
- What is so "dramatic" about working with CGI Scripts, 6.4?
According to the book, CGI dramatically increases the presence of businesses on the web because now companies are able perform transactions with customers.
- Describe the function of the elements that are used between the <FORM> and </form> tags, 6.6:
- Input Boxes (TYPE=TEXT), 6.10 - are single-line box that user can enter text or numbers.
- Password, 6.15 - similar to the input boxes, but input are replaced by asterisks.
- Selection List, 6.17 - is a list box that is good for use when there are a fixed set of possible responses.
- Radio Buttons, 6.22 - similar to the selection lists in which it display choices, but only one can be selected.
- Check Boxes, 6.25 - are similar to radio button except there is only one box per field.
- Text Area, 6.27 - is similar to the input box where it can enter text or numerical values, except it can hold longer text strings and generally use for user comments.
- Form Buttons (Submit and Reset), 6.30 - are interactive response buttons that a user click to either submit the form or clear data in the field.
- Image Fields, 6.33 - is similar to the buttons in which the user click the image resulting in a form submitting.
- Hidden Fields, 6.34 - is use to hide information from the user.
- Explain the purpose and use of the following Form Properties, 6.34:
ACTION property (p. 6.38) - identifies the CGI script that will process the form. The tag is <FORM ACTION=URL> where URL is the location of the CGI.
METHOD property (p. 6.35) - controls how the web browser will sends the data to the Web server running the CGI script. The tag for this is <FORM METHOD=Type> where Type is the either GET or POST depending on the method of transferring data.
ENCTYPE property (p. 6.35) - this property specifies the format of the data when it is transferred from the Web page to the CGI script. The tag is <FORM ENCTYPE=Text> where Text is the format of the data.
You must use the following ACTION and METHOD properties for all forms in this class:
ACTION="http://hoohoo.ncsa.uiuc.edu/cgi-bin/post-query" METHOD=POST
- What is the benefit and the result of using the MAILTO Action, 6.38
The greatest benefit in using MAILTO Action to get data from a form is that it does not require the processing of data from a Web server, but instead it uses the host computer's email program and sent the information to you via email. The problem is that the information being sent back is on a single line with special characters that must be interpreted.
- By the end of the week, add your name to the page, print the source, place your work on oscar, link to it from your home page and test it with both browsers.
- What other things have you learned about this topic?
- What were the most important things you learned about this topic?
- What is still unclear about this topic?
- How can you clarify what is still unclear about this topic?
This book is focused on HTML and related issues. Students do not have to learn CGI for this class. You may want to visit the following Web sites for information on CGI: