Welcome to John Layton's Javascript Resource Page

Javascript is a programming language which is read by web browser software such as Microsoft Internet Explorer and Netscape and can be used to perform dynamic visual effects in web pages as well as responding to the user's actions.

There are many sites offering free 'scripts' which you are permitted to embed in your own web pages, chief among them being The Javascript Source: Master List. Here you will find scripts for clocks, calculators, cursor and text effects, games, midi sound file manipulation and a thousand and one other things. It's well worth a visit.

Below are links to some of the Javascript programs I have created myself. They will give you a good idea of what can be achieved using the language and the possibilities it affords. Furthermore, you do not need expensive software to begin programming in Javascript. All my programs were written in Microsoft 'Notepad' which comes as standard with Windows. Indeed I write entire web pages in Notepad.


MYSTIFYING NIM

Nim is a mystifying and thought provoking game the origins of which date back to the beginning of recorded history. There are two versions of the game here. The first, which I have chosen to call the simple version, is nonetheless thoroughly perplexing, whilst the second is guaranteed to tax your mental capabilities to the full.

NIM FOR WINDOWS

 I have also produced the standard Nim game as a freeware windows application. If you would like to download this version then click on the link above.

ENCODER/DECODER

This program allows you to write a message to a friend or an acquaintance and encode it automatically using simple substitution. A facility is also provided for you to send the encoded message by e-mail which includes a link to the site. This is provided in case the recipient is unable to decode the message. In this eventuality your friend can visit the website and use the decoder part of the program to read his email.

LETTER FREQUENCY COUNT

In order to be able to decipher codes which have been generated randomly, it is imperative to know the letter frequency count of the  language being used. This program allows you to do just that. Paste in large volumes of text and discover the frequency order of all the letters in the alphabet. Works with all languages using the Roman alphabet. If you would like a windows executive of this utility click here.

ENCODER - RANDOM SUBSTITUTION

This is a similar program to the encoding program mentioned above, but here the codes are all generated randomly. There is an additional feature which allows you to remove all words spaces presenting the recipient with an unbroken line of characters. You may as an alternative include spaces after a given number of characters. All this adds up to a code which is very difficult to crack.

DECODER - RANDOM SUBSTITUTION

This website provides the wherewithal for decoding difficult ciphers generated by random substitution. After you have pasted your code into the specified text box the program will conduct a letter frequency count on the basis of which it will display the likely code key. You can then click a button and try it out. Various adjustments may have to be made to the key, but before long you should be able to break the code.

There is an excellent freeware application available which will decipher any code generated by random substitution. If you follow the link you will also be able to download an application of my own which will encrypt a message using a randomly generated alphabet. Click here to download the software

JAVASCRIPT ENIGMA ENCODER

Codes generated by this program are unbreakable. In fact, I defy anyone to decipher them. Visit the website and give it a try. There is a facility available to send coded messages by email with a link to the decoder site included - about the only way the messages can be deciphered. In order to understand what's happening study the source code.

JAVASCRIPT ENIGMA DECODER

The deciphering part of the above program.  Javascript enthusiasts should also study the source code for this web page.

ENIGMA ENCODER AND DECODER FOR WINDOWS

A windows application which is much faster than the Javascript online version. Among other features the program has the added advantage of a file saving facility. Click the above link to download the software.

CONCENTRATION

A Javascript version of the classic memory game. Twenty one pairs of images are hidden beneath forty two green boxes. The purpose of the game is to try to find the matching pairs in the quickest possible time. Not as easy as it sounds ! Because of the number of images involved this page takes a minute or so to load so be patient. If you would like to play this game offline CLICK HERE to download a zip file containing the program and images used.

RANDOM NUMBER GENERATION

Ever wondered how to generate a series of unique random numbers from within a given range ? Most codes I've come across which are designed do this are often lengthy and very complicated. Not any longer. Check this page out to see how you can do it with a minimum of code. I'm very proud of this function. You can change the range and the total of random numbers required without any additional code.

SUDOKU SOFTWARE

A great piece of software which randomly generates intriguing new puzzles. Sudoku is currently enjoying enormous popularity on both sides of the Atlantic.


Please include this site in your list of favourites and visit often as new Javascript programs will be added regularly. If you have any questions or comments Email Me.