Assignment Two — 40 Marks

Create the following interactive Internet pages using HTML, (some) JavaScript and CGI/Perl to accumulate survey data and present it in a HTML table format. Be sure that the hyperlinks to the files WELCOME.HTM, SURVEY.HTM and SEEIT.PL work in the DEFAULT.HTM file you created in the first assignment.

  1. A web paged called WELCOME.HTM that: (2 marks)

    1. contains a couple of graphic images
    2. contains an HTML form that will collect the visitor's name
    3. the Form "action" should refer to WELCOME.PL (below)

  2. A CGI/PERL script called WELCOME.PL that: (2 marks)

    1. receives the HTML info and processes the data into useable format
    2. stores the visitor's name (from the FORM) in a cookie that expires in 1 day
    3. use the same cookie name so that only one cookie is written per computer
    4. changes the location of the web page to the file SURVEY.HTM (below) once the cookie is written
      (hint: you will need to use Javascript for this item)

  3. A web page called SURVEY.HTM

    1. This page should use regular HTML code. The page should contain an HTML form that collects the following information: (7 marks)

      • visitor's name
      • visitor's e-mail address
      • number of months the visitor has used the Internet
        (your choice of radio or select list for this field)
      • their comfort level with the Internet
        (your choice of radio or select list for this field)
      • their reason for using the Internet: surfing, e-mail, IRC, newsgroups
        (your choice of multi select list or checkboxes for this field)
      • average number of hours person spends on the Internet each week

    2. Below a horizontal line, include a hyperlink to the file SEEIT.PL at the bottom of the web page SURVEY.HTM, so that anyone can click on this hyperlink and see the information. (1 mark)

  4. A CGI/Perl script named SURVEY.PL that will: (10 marks)

  5. Another CGI/Perl script named SEEIT.PL which will read the data in from the file SURVEY.TXT (this file will have to be in your "public" directory and present it on screen in a neat HTML "table" format with: (10 marks)

  6. Answer the following 2 questions in the web page SURVEY.HTM below the HTML form and above the hyperlink to the file SEEIT.PL. (2 marks)

  7. Answer the following question in a CGI/Perl variable in the file SURVEY.PL and display the answer to this question in the "submitted" portion of that file. (2 marks)

  8. Upload all of the files to your "nexus" account and run through the code AT LEAST three times (to generate some data for your file -- use ficitious names, stats ....). (4 marks)

Return to Previous Page