Sending form data to an HTTP server
[Top] [Up] [Next] [Previous]

10.1 - Sending form data to an HTTP server

The form contents are expressed as a property list of attribute names and values. Radio buttons and checkboxes are left out of the list when unchecked. This ensures that only the selected radio button contributes a name=value pair. Omitting the VALUE attribute for a checkbox field causes the field when checked to appear as a name without a value (this is appropriate for Boolean attributes). Currently, there are two ways of transferring form contents to an HTTP server:

In the first approach, the property list is encoded as a sequence of name=value elements separated by the "&" character. The values for the form's fields are sent as a search string, e.g.

Note that "=", "&" and space characters in attribute names and values should be escaped by "%" followed by the hexadecimal code for the character in question, e.g. "%20" should be used in place of the space character. IMAGE fields are only included in the list when clicked, and give rise to something matching:

They can be used as iconic controls for other images or data. The notation paves the way for more complex input controls in the future. In the near future, format negotiation will not change the number of pixels in an image, so using pixel based coordinates is okay. In the longer term, scaled coordinates in the range 0 to 1.0 may prove safer.

Multipart MIME messages are necessary if the form contains scribble or audio fields. Form data can be sent in the same name=value representation as described above. For scribble and audio fields, the value identifies a subsequent part in the multipart message, as specified by the Content-ID: header for each part. Another approach is to send just the SGML elements used to define form fields, i.e. the INPUT, TEXTAREA and SELECT elements. The Content-ID: headers are used to define dummy URLs. It may be possible for servers to use this approach to update forms being viewed by a browser without having to send the entire document.

HTML+ Discussion Document - November 8, 1993

[Top] [Up] [Next] [Previous]