Section 18.6. Submitting the Form


18.6. Submitting the Form

Usually, the submission of a form goes to a web application for processing. (The app almost always resides on another page of the site, built into the code with server-side markup aplenty.) Web applications mean dynamic sites, and your site is a static one, which unfortunately limits your options in terms of what you can do with the data that your visitors submit.

Your only option, in fact, is to send the form submission to your email address. When sent from Internet Explorer, the submission comes as a file attachment to an empty email. You have to save this attachment and then open it up in a text editor like Microsoft Notepad to see the information that the visitor submitted. When sent from Firefox, the submission comes in the body of the email message, so you don't need to launch your text editor to see the contents of the submission.

Either way, the data package comes in a rather technical form, as Figure 18-38 shows. Take it slowly, and you can figure out what it's saying.

Figure 18-38. The form submission comes in a rather technical form


TIP

To cut down on the technical mumbo-jumbo in the form submission, stick to alphanumeric characters in the values of your radio buttons, checkboxes, lists, and menus. The browser converts anything that isn't a letter or number into a character code. For instance, the slash character (/) becomes %2F. By eliminating the non-alphanumeric characters, you eliminate the character codes.


Still, some form submission is better than no form submission, so here's how to set up your form so that it delivers the submission to your email address:

  1. In the document window, click anywhere along the red form container to select the entire form.

  2. Go to the Property Inspector. In the Action field, type mailto: plus the email address to which you want to submit the form data (for instance, mailto:me@mysite.com).

  3. From the Method menu, choose POST. This method bundles the form submission as a kind of email message, which is exactly what you want in this case. The other option, GET, sends the form submission as a series of attribute/value pairs attached to the end of a URL, which is helpful for certain kinds of web applications but not especially useful in this case.



Dreamweaver 8 Design and Construction
Dreamweaver 8 Design and Construction (OReilly Digital Studio)
ISBN: 0596101635
EAN: 2147483647
Year: N/A
Pages: 154
Authors: Marc Campbell

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net