banner graphic

Homework Assignment 7

Due Monday, November 27

  1. Using an FTP client, connect to Crow. Navigate to the folder homework7 within the introShare folder. Find the file called hwk7.js and transfer this file to your local machine.


  2. Within your personal folder on Crow, set up a new folder called formwork. FTP the page hwk7.js into this folder.


  3. Set up a new Web page called index.htm within formwork. Within the HEAD portion of this page place the following container:


  4. <script src="hwk7.js"></script>

  5. Within the BODY portion of index.htm, create a page exactly like this:



    Use a table for layout structure. The form on this page should have the following features:


    1. A text field with SIZE and MAXLENGTH of 50 whose NAME is "firstname."


    2. A text field with the same SIZE and MAXLENGTH whose NAME is "lastname."


    3. A set of four radio buttons whose common NAME is "colors" and whose VALUE settings are "red," "green," "blue," and "mauve."


    4. A selection element with NAME="animals" and the options "lion," "tiger," "bear," "mouse," "vole," and "bullock." The SIZE attribute of this element should be set to 1. The "vole" option should be the default selection.


    5. A textarea element whose NAME is "textInput," with 5 rows and 40 columns. The initial text in this element should be "Briefly detail all the things you love about HTML forms!"


    6. A SUBMIT and a RESET button, the first labeled "Submit Form" and the second labeled "Clear Form".


  6. Set the METHOD of your form to "post" and the ACTION to "javascript: formOut()". Be sure to spell "formOut()" exactly as you see it here.

If you follow these directions correctly, you will see an alert box containing your form information when you click the "Submit Form" button.