JavaScript Zone

Script Tutorials

Introduction
Pre-requisites
Installation
Notes

Screen shot of visitor registration

Visitor Registration (v1.1)

Introduction
Related Links

Greetings message tutorial
The JavaScript Source

Updates

[08.08.01] Over 18 check and Unregister added

This Javascript allows a visitor to your site to record a userid, password, password reminder and e-mail address. The old password field is used if the visitor wishes to change their password.

The password can be used to restrict access to certain parts of your site.

The related links show some sample tutorials that make use of information registered by visitors.

Visitor Registration Demo


Pre-requisites

  • there are no pre-requisites for this tutorial
Installation

  1. Cut and paste the following code to your html page as indicated:

  2. Add text on this page explaining the benefits of registering on your site, and notes on the data you are storing.
Notes

  • this tutorial demonstrates:
    • how to design forms with user prompts and help
    • how to use cookies
    • how to capture and save data from a form
    • how to validate e-mail addresses
  • the code for maintaining cookies is taken from the original date last visitied / number of visits javascript from the JavaScript Source - thanks
  • the code for validating e-mail addresses is taken from the JavaScript Source - thanks again!
  • if you use this script, amend the variable names' prefix from pt_ to something meaningful to your site


Page last updated 8th August 2001