CECS 5100

Survey of Educational Computer Languages

Fall 2002


Assignment #1

Due Date: September 12, 2002

Value: 10 points total

Send the instructor an e-mail for each part of the assignment with the attached HTML containing the HTML/JavaScript to complete the assignment. gjones@coefs.coe.unt.edu.

Part 1 (5 pts)

    Using JavaScript within HTML write an html/script that incorporates the following elements:
      1. uses the JS document.write
      2. uses the JS alert
      3. uses a variable
      4. uses a for statement
      5. uses the JS confirm
    Test Data: None
    Output: Student Defined
    Expected Code: Student must use one or more of the above items in the submitted code.
    Note: The above were all shown during class with the exception of confirm which can be looked up in the JS sourcebook.

Part 2 (5 pts)

    Using JavaScript within HTML write an html/script that implements the following pseudo code.
      1. Upon viewing the HTML page, display the course description for 5100
      2. At the bottom/after the course description html, provide a hyper-link to the schedule page on courseweb.unt.edu under 5100
      3. When the user clicks on the schedule hyper-link, the user is presented with a confirm dialog box asking if they wish to go to the new page or not.
      4. If the user presses Okay, then the page changes to the listed URL for the schedule
      5. If the user presses Cancel, the page does not change
    Test Data: None
    Output: HTML as described, confirm dialog displayed on click of HREF for schedule, and page changes to the schedule page on confirm OK
    Expected Code: Student can use whatever JS code they wish to complete the assignment.
    Note: An example for this half of the assignment might be found on the current 5100 course pages. Hint: Remember to 'view source' when looking at a web page.

Copyright 2002, Dr. James G. Jones