Chapter 11: Programming with JavaScript


Overview

This book has concentrated on showing you how to program. I thought it most important to teach you the ideas and concepts behind programming and to show you the techniques used in most modern programming languages. I’ve also tried to inculcate good programming practices right from the start.

In this scheme of things, creating actual applications for the sake of creating applications has been a secondary goal. True, we’ve built some impressive applications, for example, the game of Rock, Scissors, and Paper in Chapter 3 and the Tchatshke Gulch auction in Chapter 7 and Chapter 8. But these applications were examples to illustrate techniques (Rock, Scissors, and Paper showed conditional expressions, and Tchatshke Gulch showed object-oriented programming and how to work with a timer event).

This chapter presents a few JavaScript applications for the sake of the applications. Obviously, I’ll explain the techniques used as we go along. But the point of these applications is to be joyful in the act of creating the application, not in any specific programming technique. My hope is that these programs will spur you on to design and write your own (see the sidebar “ Calling All Readers ”).

start sidebar
Calling All Readers

I’d love to see what JavaScript applications you create! If you write a really neat program in JavaScript, send it to me along with an email describing what the program does (use the email address <learntoprogram@bearhome.com>).

I’ll publish the best, coolest examples I get from readers in the next edition of this book. You’ll receive credit for the program and a free copy of the book when it’s republished.

end sidebar

In this chapter, I’ll show you the following:

  • How to password protect a JavaScript page

  • How to create rollovers, which is the name for a visual effect that changes the appearance of an object based on the current location of the mouse

  • How to display a slide show on the Web using JavaScript

These are fun applications, and they’re easy. So come on in, the water’s fine; let’s all have a party because you’re a programmer now!




Learn How to Program Using Any Web Browser
Learn How to Program Using Any Web Browser
ISBN: 1590591135
EAN: 2147483647
Year: 2006
Pages: 115
Authors: Harold Davis

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net