|
|||
Sorry about the delay with this final article in the "forms" series. This month I spent 2 weeks in Portugal on holidays with my family. When I returned it was my birthday and I spent a few days celebrating with different friends in different parts of the country. Last week I received the results of those exams that delayed previous articles and thankfully all my study had paid off as I received 4 A's and 3 B's. So that deserved a night or two of celebrating also.
But as much as you must be interested in my life I'm sure you would refer t finish learning about forms. There are two buttons that you will generally find at the bottom of each form - one of them is really necessary. The first is the "reset" button which quite simply resets everything in the form to its original value (i.e. the form will look identical to how it looked when the page was first loaded. The code for this button is: <input type="reset" value="Reset the Form"> The value attribute sets the text that will appear on the button. The image shows what this button will look like on Internet Explorer.
The other button is the "Submit" button. Before discussing this button I will tell you the ways you can get the information from the form. Remember the <form> tag that we use to show the start of the form. Well this tag is also used to tell the computer what to do with the content of the form when it is submitted. In my other tutorial I only discussed submitting a form by email. I will teach this here but will also discuss an alternative. <form action="mailto:me@myhouse.com" method=post> It's as simple as that. Simply change me@myhouse.com to your own email address and when the user clicks on the Submit button (I'll discuss this in a few minutes) the contents of the form will be sent directly to your email address. Don't worry about the method attribute; just make sure to add it in as shown. However this does not work with every browser, particularly the older ones (Internet Explorer 3/3.01). It is not ideal. Also the information in the email will be received as an attachment, which needs to be opened in some sort of text editor. When you do open it, it will still be difficult to read. All of the information is printed as one line of text and there are no spaces.
The copyright of the article Forms - part 4 in HTML Lessons is owned by . Permission to republish Forms - part 4 in print or online must be granted by the author in writing.
For a complete listing of article comments, questions, and other discussions related to Oisin Prendiville's HTML Lessons topic, please visit the Discussions page. |
|||
|
|
|||
|
|
|||