User Tools

Site Tools


eg-259:cw1

This is an old revision of the document!


Coursework 1: Client-Side Programming

Formally issued on: Tuesday 1st March, 2011.

Lecturer: Dr Chris P. Jobling.

Due date: Examples Class on Thursday 24th March, 2011.

The Exercise

<html><!– 2007: Develop, test and validate an XHTML document that collects the following information from the user: last name, first name, middle initial, age (restricted to be greater than 16), and height in cm (restricted to the range 90cm to 250cm). You must have event handlers for the form elements that collect this information that check the input data for correctness. Messages in alert windows must be produced when errors are detected and the offending controls should gain focus. –></html>

Develop, test and validate an XHTML document that acts as a registration form for a web application. The registration form should request a user name, contact email address, and a password.

  • The user name must be a single word which starts with a lower-case letter and contains lowercase letters, or a mixture of lower-case letters and numbers (e.g. chris, joe90). There should be no punctuation characters or embedded whitespace in the user name;
  • The email address must be a valid internet email address;
  • The password must be at least 8 characters in length, should contain any combination of numbers, punctuation (including whitespace) and upper and lower-case letters;
  • For security, the password must contain at least one number or punctuation character;
  • The password must be confirmed by typing it twice.

You must have event handlers for the form elements that collect this information that check the input data for correctness.

  1. Messages must be produced when any errors are detected and the offending control should gain focus: alert boxes can be used for this purpose although extra credit will be given if DHTML is used to ensure that the messages appear in the document itself.
  2. The error messages should be clear in reporting the corrective action to be taken by the user.
  3. Validation checks on individual form fields should be triggered by loss of focus.
  4. The submit button should be labelled “Register” and it should:
  5. The reset button should be labelled “Cancel” and should return the form to its initial state.

Submission Details

You should develop your solution in a single XHTML file and submit a paper copy to me in the lecture; this will be returned to you with feedback. You should also send me an electronic copy of the XHTML file via email which I can use for testing. A maximum of 5 marks will be awarded if I am not provided with the electronic version for marking.

How this Work will be Assessed

There will be:

  • 8 marks for successful completion of the exercise;
  • 1 mark for valid XHTML 1.1;
  • 1 mark for valid use of CSS;
  • 2 marks extra credit if the error messages are embedded in the document rather than using alerts.
  • 3 marks extra credit will be awarded for valid use of the jQuery library in the implementation of the validator;

Late submissions will not be marked.

eg-259/cw1.1298882252.txt.gz · Last modified: 2011/02/28 08:37 by eechris