FORMS

1.  It is time to learn to make pages with forms on them.

	Put this on a page:

	INPUT SIZE=100 NAME=box1

	of course, you supply the angle brackets.

2.  How does it look in a browser?

	Vary the size and add a few more.  Can you make it
	look like it's supposed to be where someone enters
	first and last name, address, city, state, and zip code?
	That's 6 different input boxes by my count.

	You'll need to add text and some BR tags for line breaks.

3.  Did you remember to name each box differently?

	Surround the INPUT boxes with the tags

	FORM METHOD=get ACTION=test.cgi

	/FORM

	and between the FORM and /FORM tags, where your six
	input tags are, add a seventh tag called

	INPUT TYPE=submit

	and see if this looks right in the browser.

4.  Type some things in the boxes and hit the submit button.

	Can you decipher the URL?

	Tell the TA your theory about how information is exchanged from
	the browser to the server using forms like this.

	Try putting a = or a & or a space in one of your fields.
	What happens to the URL?  Why?

5.  Now we can try radio buttons.  These are useful when you have
	a choice of values for a name.  For example, 

	INPUT TYPE=radio NAME=gender VALUE=male
	INPUT TYPE=radio NAME=gender VALUE=female

	will have you swapping between one and the other.

	It's always good to label your button so you know what you are
	checking.

6.  Try TYPE=checkbox instead.  Is this a good type for letting users
	select gender on a form?

7.  There is one more I want you to try.  Do this:

	SELECT NAME=state
	  OPTION Arkansas
	  OPTION Alabama
	/SELECT

	But again, you have to supply the angle brackets.  It's a bit
	of a surprise here.  You have to put OPTION in brackets by itself,
	so that Arkansas and Alabama are floating around as if they are
	text.

	Does it look right in the browser?  Add a few states.  What if you
	wanted one state to be the default?  How about adding a choice where
	the state is left blank?  Can this be done?

8.  You can add STYLE attributes, e.g., with font-size and color and 
	background-color properties, to several of the tags mentioned here.
	Try them.  The best one is the INPUT, since you can change the font,
	but the others will take style color commands too.

9.  You can even add an id, and cause something to move when you mouseover.
	Have a look at my t2.html.  Can you do this without looking at my source?

	You might have to look at it in IE for the javascript to work...

10.  Do it yourself and you are done.