1a. Logistics
1b. Introduction
1c. Requirements
i. <form
action="http://zoo.cs.yale.edu/classes/cs156/2003/cgi-bin/sendform.cgi"
method="post">
This required form item
specifies two important things: (1) Which
script (i.e., "sendform.cgi") should be executed to process the
contents of the form and (2) Which "method" (i.e., "post")
should be
used to send the contents of the web form to the server. ("Post" sends
the user's input as a "data block." One can also use method="get,"
which appends the contents of the web form to the end of the
URL. Using method="post"
is generally more reliable for larger web forms of 100 bytes or
more.)
HW1
Examples 1 and 2 illustrate this requirement. See Section 3 below
for details.
ii. <input
type="text" name="to" id="header:To" size="60" >
HW1
Examples 1 and 2 illustrate this requirement. See Section 3 below
for details.
2. Web-form basics
Here are some basics of HTML coding that
you can use in constructing your form.
i. text fields type="text"
<form>
username:
<input type="text" name="username">
</form>
How it looks in a browser:
<form>
password:
<input type="password" name="password">
</form>
How it looks in a browser:
iii.
textarea
<form>
<textarea rows="10" cols="30">
</textarea>
</form>
How it looks in a browser:
iv. radio buttons
<form>
<input type="radio" name="sex" value="male"> Male
<br>
<input type="radio" name="sex" value="female"> Female
</form>
How it looks in a
browser:
v. check boxes
<form>
<input type="checkbox" name="SonicRio">
Sonic Rio S50
<br>
<input type="checkbox" name="iPod">
iPod
</form>
vi. drop downs
<form>
<select name="juice">
<option value="currant">Currant
<option value="apple">Apple
<option value="orange">Orange
<option value="kiwi">Kiwi
</select>
</form>
There are some very good
HTML-form tutorials on the web. Here are two that you may want to
look at if you've never made a form before.
a) Webcom's Form
tutorial: http://www.webcom.com/html/tutor/forms/start.shtml
b) W3School's HTML and Form tutorial: http://www.w3schools.com/html/html_forms.asp
3. Web-form examples
We have provided two
form examples that satisfy the requirements given in 1.c. above.
You may use them as a starting point in your work on this assignment.
Recall that, if you see a webpage with an interesting
feature, you can click on View -> Source
in the menu bar to see the HTML for that page (and, in particular, for
the feature of interest).
Example 1:
Simple
email
form.
Example 2:
Moderately
simple order and credit-card form.
Both examples are packaged according to
the submission details found on the submit page.
Use winzip to extract
the files.
4. HTML
Using your favorite text editor, you can
write your own HTML code and then test it with any web browser.
The code provided in the two examples will
help you get started.
Alternatively, you can use a specialized HTML editor to create your webform
. One such editor is Netscape's
"Composer." Here are a few pointers to shareware
HTML editors that you can try out. Note that the HTML code generated
by such an editor will often contain many formatting commands and thus will
look much more complicated than the "bare bones"
code we have provided in the examples.
a) Home Site 5 http://downloads-zdnet.com.com/3000-2048-7718546.html?tag=lst-0-1
b) HTML Kit 1.0 http://downloads-zdnet.com.com/3000-2048-4687625.html?tag=lst-0-1
c) FormPAL 6.0 http://downloads-zdnet.com.com/3000-2048-10217519.html
d) Cute HTML 2.3 http://downloads-zdnet.com.com/3000-2048-7495754.html?tag=lst-0-1
e) Coffee HTML 9.5 http://downloads-zdnet.com.com/3000-2048-10191833.html?tag=lst-0-1
f) Arachnophilia Full Ver. http://downloads-zdnet.com.com/3000-2048-3991816.html?tag=lst-0-1