Exercise: Create a Simple Form

Create a form using FORM, TEXTAREA, SUBMIT, and RESET tags.

  1. Change to your public_html directory
    cd ~/public_html
  2. Create a new HTML document called form.html from scratch using your favorite editor or xemacs.
    xemacs form.html &
  3. In the file form.html, create a form, set the METHOD to POST and ACTION to send email to you.
    <FORM METHOD=POST ACTION="mailto:user@valinux.com">
    where user is your email name.
  4. Create a TEXTAREA input field.
    <TEXTAREA NAME="feedback" ROWS=5 COLS=50>
    Change this text to what you want to ask your viewers.
  5. Create submit and reset buttons.
    <INPUT TYPE=SUBMIT VALUE="Mail my feedback!">
  6. Save your html file.
  7. Examine your page in your browser.
    1. In the location window of your browser, type
      to view your page, where "user" is the name you use to login to your system.
    1. From the File menu in Navigator, choose the "Open Page" from the File menu. The Open Page dialog box appears
    2. Click the "Choose File" button. The file browser appears.
    3. Navigate to your public_html directory. The name of your html file will now appear in the Files box.
    4. Click on the file and then hit the return key or click the "OK" button at the button left of the dialog box. Then click "Open in Navigator" in the Open Page dialog box. You should always check your work in your browser.
  8. Enter text into your form, don't worry about what you type, you are going to erase it.
  9. Check that the RESET button, clears the form. If it doesn't, fix your code and try again.
  10. Enter text into your form.
  11. Check that the SUBMIT button sends your text to you.

VA Linux Systems logo

I would appreciate comments, corrections, and
suggestions for how I can improve this course.

Nancy Blachman
Variable Symbols, Inc.
356 Bush Street
Mountain View, CA 94041-1332
650 966 8999
650 966 8998 fax
nancy- at -variablesymbols.com

If you want to learn how to search effectively using Google, visit Google Guide, which you can find at www.googleguide.com.