CSC 104 Tutorial Notes Bowen Hui July 06th 2005 Recall from last time ===================== - links - image - global vs. local - within document - email Introduction ============ - an HTML form is a section of a document - contains: regular HTML content controls - users modify these controls - entered data is processed upon submission Overall Form ============ - form goes inside the body - processing goes inside the head (javascript, next time) -
Controls ======== - two general tags: - - - checkbox - values toggle between on/off - e.g.: Popcorn Eating Slumber Partying - radio button - like checkboxes - values are mutually exclusive - e.g.: Yes No - text input - text field - e.g.: Reference Number: - text area - e.g.: Other Comments? - menu - list of items to choose from - e.g.: - button - reset button - e.g.: - submit button - works together with the action - specifies a form processing agent URI - uniform resource identifier - includes URL - e.g.: ftp://ftp.is.co.za/rfc/rfc1808.txt uses ftp scheme for File Transfer Protocol services gopher://spinaltap.micro.umn.edu/00/Weather/California/Los%20Angeles uses gopher scheme for Gopher and Gopher+ Protocol services http://www.math.uio.no/faq/compression-faq/part1.html uses http scheme for Hypertext Transfer Protocol services mailto:mduerst@ifi.unizh.ch uses mailto scheme for electronic mail addresses news:comp.infosystems.www.servers.unix uses news scheme for USENET news groups and articles telnet://melvyl.ucop.edu/ uses telnet scheme for interactive services via the TELNET Protocol method - specifies which HTTP method will be used to submit the form data set. method=get - with the HTTP "get" method, the form data set is appended to the uniform resource identifier (URI) specified by the action attribute (with a question-mark ("?") as separator) and this new URI is sent to the processing agent. method=post - with the HTTP "post" method, the form data set is included in the body of the form and sent to the processing agent. - e.g.: