Lesson Plan
 

February 14, 2000

Details

Title

User interaction with forms

Time Allotment

3 hrs

Reading / References

  • Read tutorial 6 from New Perspectives manual  - Creating Web Page Forms with HTML
  • Utilizing Forms (Supplementary Notes) - Chapter 5 - Utilizing Forms (374K - zipped)

Objectives

Coursework / Lab Work

Home Work

Sample Problems

Problem 1:

Reproduce the form including in this case problem.

Notes:

 The answer is included at the end of this lesson plan - don't cheat!

Problem 2:

Create the same feedback form in exercise #1, however, have the results go to the results frame.

Frames should constructed and  named as follows:

Demo

                http://hoohoo.ncsa.uiuc.edu/cgi-bin/post-query

                <INPUT NAME=""> - naming control
                <INPUT SIZE=#> - field size
                <INPUT MAXLENGTH=#> - entry restriction
                <INPUT VALUE="default"> - default value

                <INPUT TYPE=FILE>

                <INPUT TYPE=CHECKBOX NAME="">
                Labels
                CHECKED
                VALUE="checked"  (on)
                Multiple checkboxes

                <INPUT NAME="groupname" TYPE=RADIO VALUE="item#">
                CHECKED

                <INPUT TYPE=PASSWORD NAME="pass">

                <SELECT>…</SELECT>
                <OPTION>
                <OPTION SELECTED>
                States of control

                <SELECT SIZE=#>  #>1
                <SELECT MULTIPLE>
                <OPTION SELECTED>

                <TEXTAREA NAME="" ROWS=# COLS=#>…</TEXTAREA>
                Default text between tags, all CRLFs count
                Feedback form example.. J

                <INPUT TYPE=HIDDEN NAME="" VALUE="">
                Not really hidden

                <INPUT TYPE=IMAGE NAME=BC VALUE="BC">

                <FORM ACTION="mailto: address" METHOD=POST>

Sample Problem (Solution)

<HTML>
<HEAD>
</HEAD>

<BODY>

<FORM METHOD=POST ACTION="http://hoohoo.ncsa.uiuc.edu/cgi-bin/post-query">                           

 <TABLE>
 <TR>
   <TD WIDTH=100 ALIGN=RIGHT>Name</TD>
   <TD><INPUT NAME="firstname" SIZE=25 MAXLENGTH=25>
       <INPUT NAME="middleinitial" SIZE=2 MAXLENGTH=2>
       <INPUT NAME="lastname" SIZE=25 MAXLENGTH=25></TD>
 </TR>

 <TR>
   <TD WIDTH=100 ALIGN=RIGHT>Address 1</TD>
   <TD><INPUT NAME="address1" SIZE=50 MAXLENGTH=50></TD>
 </TR>

 <TR>
   <TD WIDTH=100 ALIGN=RIGHT>Address 2</TD>
   <TD><INPUT NAME="address2" SIZE=50 MAXLENGTH=50></TD>
 </TR>

 <TR>
   <TD WIDTH=100 ALIGN=RIGHT>City</TD>
   <TD><INPUT NAME="city" MAXLENGTH=30 SIZE=30>
       Prov <INPUT NAME="prov" SIZE=2 MAXLENGTH=2>
   </TD>
 </TR>

 <TR>
   <TD WIDTH=100 ALIGN=RIGHT>Country</TD>
   <TD><INPUT NAME="country"> PC <INPUT NAME="pc" SIZE=8 MAXLENGTH=8></TD>
 </TR>

 <TR>
   <TD WIDTH=100 ALIGN=RIGHT>email</TD>
   <TD><INPUT NAME="email" MAXLENGTH=30 SIZE=30></TD>
 </TR>

 <TR>
   <TD COLSPAN=2 ALIGN=CENTER>
    <BR>
    <INPUT TYPE=SUBMIT VALUE="Post it man!">
    <INPUT TYPE=RESET VALUE="Clear Form">
   </TD>
 </TR>
 </TABLE>

</FORM>

</BODY>
</HTML>