4WWW95: tutorial:
an in-depth view of forms, tables and cgi
author:
alan richmond, CyberWeb SoftWare
overview:
this tutorial showed ways to enable users to respond to Web pages. alan presented tables, clickable
imagemaps and HTML forms processed by cgi scripts.
tables:
this is a simple table:
rows / cols | col 1 | col 2 | col 3 | col 4 |
row 1 | 11 | 12 | 13 | 14 |
row 2 | 21 | 22 | 23 | 24 |
row 3 | 31 | 32 | 33 | 34 |
- a table starts with the <TABLE>-tag, is made out of rows and columns and ends with the
</TABLE>-tag.
- a row starts with the <TR>-tag, is made out of data and/or header fields and ends with the
</TR>-tag.
- a data field starts with the <TD>-tag and ends with the </TD>-tag. a header field is
basically the same as a data field, but uses a <TH>-tag, rsp. </TH>-tag and is displayed
highlighted and with different default alignments.
- the number of rows is determined by the number of TR-tags inside the table.
- the number of columns is determined by the number of data and/or header fields inside the row.
various attributes allow to modify horizontal and vertical alignment, enable or disable borders and
support fields that span multiple rows or columns.
important notice: please be aware that all tags and attributes that define tables are NOT part of the
current HTML standard, these are just PROPOSED EXTENSIONS !
see also session about HTML V3.0.
ISMAP attribute:
if the ISMAP attribute is present in an IMG-tag and the image tag is within an anchor, the image will
become a "clickable image". the pixel coordinates of the mouse pointer will be sent to the cgi script
specified in the anchor in the form "URL?x.y" for further processing.
forms and cgi scripts:
forms add the dimension of interactivity to the Web. without forms, Web pages are "read-only". forms
let the users write back to the author of the document, provide means to access databases and so on. a
form is linked to a so called cgi script via the ACTION attribute in the FORM-tag.
forms my have text fields, text arrays, radio buttons, checkboxes, pull-down menus, scrolling lists etc.
each field in a form has a NAME attribute. in addition, a form has a submit button. if a user submits a
form, the information provided by the user is sent to the server for processing via a cgi script.
cgi stands for "Common Gateway Interface". while the form is platform independent, the actual cgi
script depends on the operating system of the system where the HTTP daemon runs on. the cgi script
can either be a shell script or a program written in any programming language supported by the
operating system on the server. a very popular programming language to handle forms is PERL.
there are two methods to transfer the information from the client to the server: GET and POST.
information from a form using the GET method is appended to the end of the action URL. on a UNIX
system, the information is stored in the environment variable QUERY_STRING.
if the POST method is requested, the data from the form field is transmitted immediately after the
action URL. on a UNIX system, the data must be read from stdin. the number of bytes available on
stdin is stored in the environment variable CONTENT_LENGTH (there is no "end of file" mark).
my comment:
alan provided useful information in his tutorial. however, for his tutorial, a title such as
"introduction to forms, tables and cgi scripts" would have been more appropriate. he provided not
more than an overview of these powerful features of HTML. he left most questions from the audience
unanswered and some of his statements need further investigations ...
back to 4WWW95 main document.
4WWW95 tutorial E /
08-jan-96 (ra) /
reto ambühler
!!! Dieses Dokument stammt aus dem
ETH Web-Archiv und wird nicht mehr gepflegt !!!
!!! This document is stored in the
ETH Web archive and is no longer maintained !!!