Some fundamental principles apply to game programming regardless of the language you use to create the game. These principles include gathering input from users, processing game data, and rendering game objects to the screen. This article shows you how to use JavaScript to program a simple game.
Have you ever seen a Web page that uses colors that should never have been juxtaposed? It turns out that people simply have a hard time imagining how colors look together unless they can see the combined results. Now you can use this color-picker embedded in an interactive page to help people choose sensible color combinations.
You've probably seen those nifty Web-based calendars that let users navigate through months and years to select a specific date. Unfortunately, most of them aren't terribly appealing. This solution shows you how to build your own customizable calendar that displays a different image for each month.
Although the need to display ever-increasing content is relentless, the screen real-estate available to hold that content increases far less rapidly. One solution is to display rotating lists of items. By rotating the list, you can fit more information into less space, add visual interest to your pages, and still provide a simple and intuitive user experience.
You've seen pick lists in Windows where you select an item from one ListBox and it moves to a second ListBox (or vice versa). This solution shows you how to recreate that interface pattern in a browser.
Tree controls provide a hierarchical view of data and XML provides a way to structure data hierarchically, so viewing XML data as a tree structure is a natural fit. But browsers don't provide a tree control. Instead, use this mix of XML, XSLT, JavaScript, and CSS to produce an extensible HTML tree control.
Developing a multi-page form inevitably involves tradeoffs. To avoid long scrolling forms, developers often think they're forced to implement lengthy and slow round-trips to get subsequent pages and to confront the complexities of storing state between the form pages. But using JavaScript, you can both avoid scrolling and eliminate wasteful round trips.
When you need to display hierarchical information in your Web pages, build this Explorer-like tree control by creating only three polymorphic JavaScript objects.
It seems like everyone uses the folder tab metaphor on their Web pages these days. Find out how you can do it too.
With a few stylesheet rules, some JavaScript mouse-tracking and positioning code, and a DHTML-capable browser, you can create pop-up menus that make your Web applications easier to use.