JavaScript Zone

Script Tutorials

Introduction
Pre-requisites
Code
Notes
Exercises
Screen shot of To Do list
Screen shot of 'To Do' List

To Do List (v1.1)

Introduction
Links

This Tutorial on Javascript Source
This Tutorial on SimplyTheBest

Updates

[06.06.01]Edit function added

This javascript shows how to maintain a simple "To Do" list, using cookies.

Click below for a demonstration:

To Do List Demonstration


Pre-requisites

  • None.
Code
Folow the instructions below to cut and paste all the code listed into your html file:

Notes

This script demonstrates the following:
  • how to use cookies to add, update and delete items
  • version 1.1 now shows you how to edit items
  • how to display a list using dynamic html (DHTML)
  • how to refresh the screen after removing items
Exercises

  • write a separate function to count all the items. This function can the be used in a separate html page that calls the 'To DO' list. This first page can warn the user how many items he has, and automatically load the 'To Do' list (using 'onload' on the statement) if he has 1 or more items.


Page last updated 6th June 2001