Professional Documents
Culture Documents
FORMS
FORMS
O the Web.
• GET method - contacts the form-processing server and sends the form
data in a single transmission step:
• the browser appends the data to the form's action URL, separated by
the question mark (?) character.
<FORM> ATTRIBUTES
• RULES OF THUMB IN USING THE GET AND POST METHOD:
Use GET method when: Use POST method when:
• sending small forms with a few • sending forms that have many
short fields fields, or ones that have long
• inexperienced in writing server- text fields
side form-processing • security is an issue
applications
• a web page is a target for
bookmarking
<FORM> ATTRIBUTES
• ACTION attribute is a pointer to the script that processes the form on the server side.
• The ACTION can be indicated by a relative path or by a full URL to a script on your server
or somewhere else.
• Most webmasters keep their forms-processing applications in a special directory on their
Web server, usually named cgi-bin
• Keeping these special forms-processing programs and applications in one directory
makes it easier to manage and secure the server.
NAME
• useful when you want to use scripting like VB or JAVA scripts.
TARGET
• the target frame where the response page will show up.
INPUT ELEMENT
<INPUT> tag creates the data entry fields on an HTML form.
Use this tag to define one common form elements, including text fields, multiple-choice lists,
clickable images, and submission buttons.
Although there are many attributes for this tag, only the TYPE and NAME attributes are
required for each element.
RADIO Type – is similar to a list but you need to select an item in that group.
• Attributes required are NAME, VALUE, CHECKED
INPUT TYPE ELEMENT
CHECKBOX Type – items are grouped in a set of choices that can easily be selected and
deselected.
• Attributes required are NAME, VALUE, CHECKED
INPUT TYPE ELEMENT
IMAGE Type - forms behave just like image maps; when you click somewhere on the image,
the form is submitted back to the server
HIDDEN Type - a way to embed information into your forms that cannot be ignored or altered
by the browser or user
• Attributes required are NAME, VALUE