Chapter 12

Handling Events

In This Chapter

arrow Understanding how events work

arrow Interacting with events

arrow Handling keyboard events

arrow Creating a custom event

A lot of developers make a big deal out of events and feel that they’re just a bit confusing. However, all that an event really says is that something has happened. Something happens, and then your application reacts to it. There’s a bit more to it than that, but if you want to avoid becoming confused about events, always think about them as saying something has happened.

This chapter examines events in detail because events are the action portion of an application — the part that a user actually sees when interacting with the application. Previous chapters show you how to perform some basic tasks when reacting to events, such as displaying a dialog box or information onscreen when a user clicks a button. This chapter goes into more detail about events and helps you see how they can make your applications easier and more exciting to use.

Most HTML controls provide sufficient events to support most user needs. In some cases, you may decide ...

Get HTML5 Programming with JavaScript For Dummies now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.