[ Pobierz całość w formacie PDF ]

body of the form and sent to the processing agent.
The "get" method should be used when the form is idempotent (i.e., causes no
side-effects). Many database searches have no visible side-effects and make ideal
applications for the "get" method.
If the service associated with the processing of a form causes side effects (for
example, if the form modifies a database or subscription to a service), the "post"
method should be used.
Note. The "get" method restricts form data set [p.246] values to ASCII characters.
Only the "post" method (with enctype="multipart/form-data") is specified to cover
the entire [ISO10646] [p.353] character set.
17.13.2 Successful controls
A successful control is "valid" for submission. Every successful control has its control
name [p.220] paired with its current value [p.220] as part of the submitted form data
set [p.246] . A successful control must be defined within a FORM element and must
have a control name. [p.220]
However:
Controls that are disabled [p.244] cannot be successful.
If a form contains more than one submit button [p.221] , only the activated
submit button is successful.
All "on" checkboxes [p.221] may be successful.
For radio buttons [p.221] that share the same value of the name attribute, only
the "on" radio button may be successful.
For menus [p.222] , the control name [p.220] is provided by a SELECT element
245 24 Dec 1999 18:26
Forms in HTML documents
and values are provided by OPTION elements. Only selected options may be
successful. When no options are selected, the control is not successful and
neither the name nor any values are submitted to the server when the form is
submitted.
The current value [p.220] of a file select [p.222] is a list of one or more file
names. Upon submission of the form, the contents of each file are submitted
with the rest of the form data. The file contents are packaged according to the
form s content type [p.247] .
The current value of an object control is determined by the object s
implementation.
If a control doesn t have a current value [p.220] when the form is submitted, user
agents are not required to treat it as a successful control.
Furthermore, user agents should not consider the following controls successful:
Reset buttons. [p.221]
OBJECT elements whose declare attribute has been set.
Hidden controls [p.222] and controls that are not rendered because of style sheet
[p.183] settings may still be successful. For example:
name="invisible-password"
value="mypassword">
will still cause a value to be paired with the name "invisible-password" and
submitted with the form.
17.13.3 Processing form data
When the user submits a form (e.g., by activating a submit button [p.221] ), the user
agent processes it as follows.
Step one: Identify the successful controls
Step two: Build a form data set
A form data set is a sequence of control-name [p.220] /current-value [p.220] pairs
constructed from successful controls [p.245]
Step three: Encode the form data set
The form data set is then encoded according to the content type [p.247] specified by
the enctype attribute of the FORM element.
24 Dec 1999 18:26 246
Forms in HTML documents
Step four: Submit the encoded form data set
Finally, the encoded data is sent to the processing agent designated by the action
attribute using the protocol specified by the method attribute.
This specification does not specify all valid submission methods or content types
[p.247] that may be used with forms. However, HTML 4 user agents must support
the established conventions in the following cases:
If the method is "get" and the action is an HTTP URI, the user agent takes the
value of action, appends a  ? to it, then appends the form data set [p.246] ,
encoded using the "application/x-www-form-urlencoded" content type [p.247] .
The user agent then traverses the link to this URI. In this scenario, form data are
restricted to ASCII codes.
If the method is "post" and the action is an HTTP URI, the user agent
conducts an HTTP "post" transaction using the value of the action attribute
and a message created according to the content type [p.247] specified by the
enctype attribute.
For any other value of action or method, behavior is unspecified.
User agents should render the response from the HTTP "get" and "post"
transactions.
17.13.4 Form content types
The enctype attribute of the FORM element specifies the content type [p.53] used to
encode the form data set [p.246] for submission to the server. User agents must [ Pobierz całość w formacie PDF ]
  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • szamanka888.keep.pl