SiteExperts.com Logo Home | Community | Developer's Paradise | Jobs
User Groups | Site Tools | Site Information | Search

Inside Technique : DHTML Pegs
By Scott Isaacs

Pegs is a simple game where you remove the pegs from the board by jumping them with other pegs. Each jump removes the jumped peg. To jump, click on the source peg (pegs are identified as checked radio buttons) and click on the unchecked button to jump one peg at a time. Only horizontal and vertical jumps are allowed. The goal is to leave one peg in the center hole.

Since this game is basically an HTML form, we set out to create a cross-browser version of the game. We started with writing a very compact version of the game for Internet Explorer 4.0. With a little bit of work, we were able to get the game to run on Navigator 4.0. With a little more hacking, we also got the game to run on Navigator 3.0. We did not test the game in Internet Explorer 3.0 (in theory it should run :-). If you are running a 4.0 browser, you can play the game below. The ugly background in Netscape Navigator 4.0 is due to a change in the way they handle backgrounds behind the radio button (Navigator 3.0 does not have this problem). After playing, you can read about the issues we had making this game work cross-browser.

Layout: