Slide 3.2: How to construct the Programming Exercise I
Slide 3.4: Calling a CGI Perl script
Home

How to Construct the Exercise I (Cont.)

  1. HTML Web User Interface Construction HTML (HyperText Markup Language) is the basic language used to write web pages. It is generally not difficult to create a static web page. However, a dynamic web page needs the support from application programs on a host computer. The following example shows how to create a dynamic web page of searching cartoon characters by using string matching. An empty string will display all characters.

    /home/wenchen/public_html/351/week3/CGIDemo.html
    <html>
       ...
     <form method="post" 
       action="http://people.cs.und.edu/~wenchen/cgi-bin/351/week3/CGIDemo.pl">
      Name: <input type="text" name="name" value="mon" size="20">
      <input type="submit" name="act" value="Submit">
      <input type="submit" name="act" value="Help">
      <input type="reset"             value="Reset"> 
     </form>
       ...
    </html>
    http://people.cs.und.edu/~wenchen/351/week3/CGIDemo.html

      Name:    

                   

    HTML FORMs are used to select different kinds of user input. A form is an area that can contain form elements. Form elements are elements that allow the user to enter information (like text fields, textarea fields, drop-down menus, radio buttons, checkboxes, etc.) in a form.

    • type="text": It specifies a single line text entry field.
    • type="submit": When the button is clicked, the form is submitted.
    • type="reset": When the user clicks the button, all the fields in the form are reset to their initial values.