Home João Gomes Mota contact Web design

On this page, I introduce some of the JavaScript and DynamicHTML applications I published.

How to make an Advent Calendar with JavaScript

With an Advent Calendar, families prepare for Christmas, representing each day from December, 1st to December, 24th with a numbered window (or door, drawer, etc.). Every day, the corresponding window is open, revealing a surprise.

More than presenting a Calendar, this is an exercise to show the methodology to build an application with JavaScript, with step by step instructions.

Published in February 2005.



A classical puzzle programmed with JavaScript with two boards and three different scenes: three 15-piece puzzles (4x4 board) and three 24-piece puzzles (5x5 board).

The purpose of the game is to organise the pieces on the board until all the scene fragments match. The pieces next to the empty space may be moved there, shifting the open space. To move a piece next to the open space, just click on it.

Created in June 2002. Netscape Navigator 4.0 and later. Internet Explorer 4.0 and later.



A two-player strategy game on a 8x8 board with bi-coloured pegs. Each player chooses one colour, black or white. Then they play in turns, adding one peg with their colour facing top at each turn. When a peg is added, all the pegs of the opposite colour located between the new peg and other pegs of the same colour in the horizontal, vertical or diagonal directions are turned.

The game ends when all the 64 pegs are on the board. The player with most pegs wins.

This application has some interesting technical aspects:

  • It uses only JavaScript, version 1.2
  • The board page is re-rewritten at each new peg, from a script that defines the layout and the active elements.
  • A frameset is used to store the game variables while the board page is being re-written.
  • The game was design to allow one player option, using the computer as the other player. However, the poor performance of interpreted languages makes it slow and uninteresting.

Created in June 2002. Netscape Navigator 4.0 and later. Internet Explorer 4.0 and later.

Mastermind and the game of colours
the game of colours

Mastermind and the Game of Colours

This is a version of the Mastermind for one player (the computer generates the colour key at random). I also added my personal variation of this game, which I called the Game of Colours. This application includes a detailed user manual with examples, both for the Mastermind and the Game of Colours.

This application uses a little DynamicHTML and JavaScript cookies to store a high-score table.

Created in September 2001. Netscape Navigator 4.0. Internet Explorer 4.0 5.0.

see also:

I started JavaScript and DynamicHTML with more serious applications in mind, as you may find on my scientific presentations (since 1998) and the photo albums (since 2000). De entre as várias aplicações criadas destaco:

Master Thesis presentation
Apparently, this presentation is quite recent. However, most pages are adapted from older presentations I gave in scientific events since 1998. It combines JavaScript, DynamicHTML and animated GIFs for an optimal understanding of the subjects.
The remaining presentations add a few movies (*.mpeg) and three-dimensional models in VRML (Virtual Reality Modelling Language).
Bienvenue en Belgique
This photo albums was designed as a full DynamicHTML application. In fact, I'm considering using it on future albums.
©2002-05 João Gomes Mota
Published in April 2002. Last update: March 2005. top of page