
|
 |
 |

The <FORM>...</FORM> tag is basic to including a form it tell the browser where the form starts and ends. You will place all the various form fields inside this tag. The <FORM> tag has two required attributes, they are: METHOD, and ACTION.
METHOD
This attribute tells the server how the information will be sent. There are two methods (or values) to choose from, they are: post, and get. The "post" value sends the information line by line. The "get" value concatenates the information into one string, and then sends it. You can easily tell what type of method a form uses by looking a the URL after you submit the information. If the URL is a long string with a question mark (?) after the website address and the form elements are in the URL with the ampersand (&) symbol connecting them then they are using the "get" method. When you use the get method the user can bookmark the page they searched for without having to make the entry in the form again. When you don't want the values passed along the URL you should use the "post" method, usually it's when asking for personal information.
ACTION
This attribute is where you tell the form where to send the information that it has gathered. The value should be the address of the file that contains the scripts that will process the information, like an ASP file. When working with forms you may not want it to go to a specific CGI script to be processed, for instance when using forms in conjunction with JavaScript (like a pull down menu with links) in this case you may just place a pound symbol (#), which will not send any information to the server.
NAME
This attribute names the form. It is not required like the previous attributes, but you should get in the habit of naming them. It is useful when you are using JavaScript, you will use the name of the form to create the scripts.
© Copyright 2000-2002 by Pepmint.com. All Rights Reserved |
 |
 |
|