front 1 Forms | back 1 Interactive elements that provide a way for the Web site visitor to interact with the site. A form provides a method for a user to give feedback, submit an order for merchandise or services, request information, and so on. Forms are created using HTML tags. Each form must have a beginning <form> tag and an ending </form> tag. You cannot nest forms. Each HTML document, however, may contain multiple forms. A form provides a popular way to collect data from a Web site visitor. Forms, however, do not process data. Forms require a script to process the form input data. A common way to process form data is through a Common Gateway Interface (CGI) script. |
front 2 Server-side scripts and their use | back 2 Forms require a script to process the form input data. Such a script generally is a text file that is executed within an application and usually is written in Perl, VBScript, JavaScript, Java, or C++. These scripts reside on a server. Other server-side technologies include Adobe ColdFusion, ASP, ASP.NET, PHP, and JavaServer Pages (JSP). Some type of database application typically supports these technologies. |
front 3 Common Gateway interface | back 3 A common way to process form data. When a browser collects data, the data is sent to a Hypertext Transfer Protocol (HTTP) server (a gateway) specified in the HTML form. The server then starts a program (which also is specified in the HTML form) that can process the collected data. The gateway can process the input however you choose. It may return customized HTML based on the user’s input, log the input to a file, or e-mail the input to someone. |
front 4 <form> tag | back 4 Includes parameters that allow you to specify a path to the server-side script or application that processes the form data and indicate which HTTP method to use when transmitting data from the browser to the server. The two HTTP methods are GET and POST, and both of these methods are attributes of the <form> tag. |
front 5 GET method | back 5 Sends the data with a URL. This method is not widely used because it places a limitation on the amount and format of the data that is transmitted to the application. Another limitation of the GET method is that the information being sent is visible in the browser’s Address bar. |
front 6 POST method | back 6 Is more efficient because it sends the data to the application as standard input with no limits. The POST method can send much more information than the typical GET method. With POST, the information is not sent with the URL, so the data is invisible to the site visitor. |
front 7 <input> tag | back 7 Collects data from check boxes, option buttons (called radio buttons in Dreamweaver), single-line text fields, form/image buttons, and passwords. |
front 8 <select> tag | back 8 Used with list and pop-up menu boxes. |
front 9 <textarea> | back 9 Collects the data from multiline text fields. |
front 10 horizontal rule | back 10 Useful for organizing information and visually separating text and objects. You can specify the width and height of the rule in pixels or as a percentage of the page size. The rule can be aligned to the left, center, or right, and you can add shading or draw the line in a solid color. These attributes are available through the Property inspector. The HTML tag for a horizontal rule is <hr>. |
front 11 Form object | back 11 Can be a text box, check box, radio button, list, menu, or other button. Form objects are discussed in more detail later in this chapter. |
front 12 Read the paragraph under Inserting a Form 419 and then explain the process of inserting a form. | back 12 Position the insertion point where you want the form to start and then click the Form button on the Forms tab on the Insert bar. Dreamweaver inserts the <form> and </form> tags into the source code and then displays a dotted red outline to represent the form in Design view. |
front 13 Form ID | back 13 Naming a form makes it possible to reference or control the form with a scripting language, such as JavaScript or VBScript. |
front 14 Action | back 14 Contains the mailto address or specifies the URL to the dynamic page or script that will process the form. |
front 15 Target | back 15 Specifies the window or frame in which to display the data after processing if a script specifies that a new page should be displayed. The four targets are _blank, _parent, _self, and _top. The _blank target opens the referenced link (or processed data) in a new browser window, leaving the current window untouched. The _blank target is the one most often used with a jump menu, which is discussed later in this chapter. The _self target opens the destination document in the same window as the one in which the form was submitted. The two other targets mostly are used with frames. |
front 16 _blank | back 16 Opens the referenced link (or processed data) in a new browser window, leaving the current window untouched. |
front 17 _self | back 17 Opens the destination document in the same window as the one in which the form was submitted. |
front 18 Method | back 18 Indicates the method by which the form data is transferred to the server. The three options are POST, which embeds the form data in the HTTP request; GET, which appends the form data to the URL requesting the page; and Default, which uses the browser’s default setting to send the form data to the server. Generally, the default is the POST method. The POST and GET methods were discussed earlier in this chapter. |
front 19 Enctype | back 19 Specifies a MIME (Multipurpose Internet Mail Extensions) type for the data being submitted to the server so the server software will know how to interpret the data. The default is application/x-www-form-urlencoded and typically is used with the POST method. This default automatically encodes the form response with non-alphanumeric characters in hexadecimal format. The multipart/form-data MIME type is used with a form object that enables the user to upload a file. You can select one of these two values from the Enctype list box or manually enter a value in the Enctype list box. The text/plain value is useful for e-mail replies, but is not an option in the Enctype list box and must be entered manually. This value enables the data to be transmitted in a readable format instead of as one long string of data. |
front 20 Class | back 20 Sets style sheet attributes and/or attaches a style sheet to the current document. |
front 21 Define monospace 424 then contrast fonts that are monospace to fonts that are not monospaced. It’s not necessary that you name specific fonts rather you might discuss specific letters and tell how the space on the page/screen is used. | back 21 The text field width for labels is measured in monospace, meaning that each character has the same width. Most regular fonts, however, are not monospaced; they are proportional. |
front 22 Text field | back 22 A form object in which users enter a response. Forms support three types of text fields: single-line, multiple-line, and password. Input into a text field can consist of alphanumeric and punctuation characters. |
front 23 Textfield | back 23 Assigns a unique name to the form object. |
front 24 Char width | back 24 Specifies the width of the field in characters. |
front 25 Max char | back 25 Specifies the maximum number of characters that can be entered into the field. |
front 26 Type | back 26 Designates the field as a single-line, multiple-line, or password field. |
front 27 Init val | back 27 Assigns the value that is displayed in the field when the form first loads. |
front 28 Class | back 28 Establishes an attribute used with Cascading Style Sheets. |
front 29 Disabled | back 29 Disables the text area. |
front 30 Read-only | back 30 Makes the text area a read-only text area. |
front 31 single-line text field | back 31 Allows a single word or short phrase response. |
front 32 Form object names cannot contain what??? | back 32 spaces or special characters other than an underscore; form names are case-sensitive |
front 33 Char Width field default setting is what??? If the character width is left at the default and a user enters 50 characters, what will happen??? | back 33 20 characters |
front 34 The Max Chars field defines what??? If the user exceeds the limit, what will happen??? | back 34 the size limit. |
front 35 The Init Val of a text box is what??? | back 35 the text displayed when the form is in the browser. |
front 36 password text field | back 36 A single-line text box that contains special characters. When a user types in a password field, asterisks or bullets replace the text as a security precaution. Note, however, that passwords sent to a server using a password field are not encrypted and can be intercepted and read as alphanumeric text. For this reason, you always should provide encryption for data you want to keep secure. |
front 37 multiple-line text field | back 37 Provides a larger text area in which to enter a response. |
front 38 Labels | back 38 Identify the type of data to be entered into the TextField form object. Adding a descriptive label to the form that indicates the type of information requested provides a visual cue to the Web site visitors about the type of data they should type into the text box. Inserting text in a form is as simple as positioning the insertion point and then typing. |
front 39 Check boxes | back 39 Allow the Web visitor to click a box to toggle a value to either yes or no. Check boxes frequently are used to enable the visitor to select as many of the listed options as desired. Figure 6–37 displays the Property inspector for a check box. Just like a text field, each check box should have a unique name. The Checked value text box contains the information you want to send to the script or include in the mailto information to identify the data. For the Initial state, the default is Unchecked. Click Checked if you want an option to appear selected when the form first loads in the browser. |
front 40 Read the paragraph under Select (List/Menu) and explain the difference between the two. | back 40 A list provides a scroll bar with up and down arrows that lets a user scroll the list, whereas a menu contains a pop-up list. Multiple selections can be made from a list, while users can select only one item from a menu. The menu option is discussed later in this chapter. |
front 41 Selecting an item to be “Initially selected” means what when the Web page is displayed in the browser? | back 41 It means that specific item is the item that is originally selected when someone loads the website. |
front 42 Read the paragraph under Pop-up Menus before discussing Pop-up Menus here. | back 42 Is useful when you have a limited amount of space because it occupies only a single line of vertical space in the form. Only one option is visible when the menu form object is displayed in the browser. Clicking an arrow button displays the entire list. The user then clicks one of the menu items to make a selection. |
front 43 Jump menu | back 43 A special type of pop-up menu that provides options that link to documents or files. You can create links to documents on your Web site, links to documents on other Web sites, e-mail links, links to graphics, or links to any other file type that can be opened in a browser. A jump menu can contain three basic components:
items or instructions, such as Choose one.
|
front 44 How is the Textarea form object different from the TextField form object??? | back 44 TextField form objects are single-line whereas Textarea form objects are multiline. |
front 45 Form buttons | back 45 Control form operations. HTML provides three basic types of form buttons: Submit, Reset, and Command. Submit and Reset buttons are standard features of almost every form. When the user clicks the Submit button, the data entered into a form is sent to a server for processing or forwarded to an e-mail address. In some instances, the data is edited by JavaScript or other code prior to processing. The Reset button clears all the fields in the form. You also can assign to a Command button other processing tasks that you have defined in a script. For example, a Command button might calculate the total cost of a hotel room for a week. Command buttons require that additional code be added using Code view. |
front 46 Submit button | back 46 The data entered into a form is sent to a server for processing or forwarded to an e-mail address. In some instances, the data is edited by JavaScript or other code prior to processing. |
front 47 Reset button | back 47 Clears all the fields in the form. |
front 48 Radio Buttons and Radio Group | back 48 Provide a set of options from which the user can select only one button. Clicking a second button automatically deselects the first choice. Each button in a form consists of a radio button and a corresponding descriptive label. In Dreamweaver, you can insert radio buttons one at a time or insert a radio button group. When you insert an individual radio button, the Property inspector shown in Figure 6–76 is displayed. In the Property inspector’s Radio Button text box, type a descriptive name. If you are inserting individual radio buttons to create a group, you must label each button. In the Checked value text box, enter the value you want to send to the server-side script or application when a user selects this radio button. For the Initial state, click Checked if you want an option to appear selected when the form first loads in the browser. A radio button group is a commonly used option. If you are adding multiple radio buttons to a form, each set of radio buttons must have a unique name. When you click the Radio Group button on the Forms tab, the Radio Group dialog box is displayed. |
front 49 Behavior | back 49 A combination of an event and an action. Behaviors are attached to a specific element on the Web page. The element can be a table, an image, a link, a form, a form object, and so on. When a behavior is initiated, Dreamweaver uses JavaScript to write the code. JavaScript is a scripting language written as a text file. After a behavior is attached to a page element, and when the event specified occurs for that element, the browser calls the action (the JavaScript code) that is associated with that event. A scripting language, such as JavaScript, provides flexibility, interaction, and power to any Web site. To create this type of user interaction with almost any other software program requires that you write the JavaScript. When you attach a behavior in Dreamweaver, however, the JavaScript is produced and inserted into the code for you. |
front 50 What is the purpose of validating the form??? | back 50 This behavior verifies that the user has entered data into each designated field. The form is checked when the user clicks the Submit button. If omissions or other errors occur, a Microsoft Internet Explorer (or other browser) dialog box is displayed. The errors then must be corrected before the form can be submitted successfully. |