GREATINTERNETPROOFING.COM

damp proofed - www.greatinternetproofing.com

Menu


1. Open the helpdesk.htm page located in the root of the project folder. For the most part, the design has already been created for you. For


now, we're simply concerned with adding a form and form objects so that our fictitious Dorknozzle employees can submit helpdesk tickets (requests for help). 2. As a change of pace, we'll use the Forms category in the Insert bar to work with forms and form objects. If your Insert bar is not open, choose Window, Insert. When the Insert bar opens, switch to the Forms category. 3. Place your cursor in the third cell of the Content table (in the second cell underneath the existing HelpDesk subheader image). 4. Click the Form icon in the Insert bar to add a new form to your helpdesk.htm page. As you can see in Figure 9.3, the form is indicated by the red dashed box. Because a form is considered an invisible element, you can choose to display it or hide it by enabling or disabling the Invisible Elements option in the Visual Aids menu in the Document bar. Figure 9.3. The form is added to the page and is evident by the red dashed box. [View full size image] Also notice that the form changes the Properties Inspector. These properties include: Form name: Enter a value into this text box to uniquely identify your form. Although this value isn't required, it's highly recommended that you add a value to uniquely identify your form, especially when working with client-side scripting languages such as JavaScript (covered with more detail in the next chapter). We'll leave our form name as the default form1. Action: Enter the path to the page that will process this form when the user submits the form. Although I'll save the long-winded explanations for Part V, for now, know that every form's submission requires some sort of data collection endpoint. That endpoint is generally a database, text file, XML file, or even a straight email to a recipient. To get the form into that data collection mechanism, an intermediary file (containing functions with code) must process the form and perform the insertion into the data collection mechanism. For this chapter, that page has been created for you. The path, and the value you'll want to enter into this text box is http://www.dreamweaverunleashed.com/scripts/helpdesk.asp. Target: Select one of the four options from this menu to associate the action with a particular link target. We'll leave ours blank. Class: When working with CSS, select a class from this menu to set the overall style of the form. We'll leave ours blank. Method: Select one of the two options from this menu to set how the form should be sent to the intermediary file for processing. Two options are available from this menu: POST and GET. POST, which is the Dreamweaver and browser default, embeds the form within HTTP headers, essentially unseen by anyone. Nine times out of ten, you'll use POST in your development efforts because it's a much more secure alternative to GET. However, you can use GET to send the contents of all form elements within the form, appended as parameters within the URL of the page. This is beneficial when working with searches: the user can bookmark a recent search because the submitted search value is appended to the URL of the page. As you can see in Figure 9.4, eBay uses GET when submitting searches for processing. This allows the user to later bookmark popular searches. Figure 9.4. Use GET with search forms to allow users to bookmark recent searches. [View full size image]   Searches are about all you want to use the GET method for. Because of the potential security vulnerability and the fact that URL strings are limited to 8192 characters, longer forms, especially those containing sensitive data such