Skip to Main Content
Programming Atlas
book

Programming Atlas

by Christian Wenz
September 2006
Intermediate to advanced content levelIntermediate to advanced
408 pages
10h 38m
English
O'Reilly Media, Inc.
Content preview from Programming Atlas

Chapter 6. Components and Behaviors

Handling events with script code or markup can be a practical way to create user experiences that are more interactive, but sometimes this approach just requires too much code. This is especially true when you wish to tie a specific action to a particular control, such as one that is a reaction to a user clicking or hovering over it. Fortunately, Atlas offers a viable alternative that will be covered in this chapter.

Two new concepts are introduced in this chapter: Atlas components and Atlas behaviors. Whereas Atlas behaviors contain JavaScript functionality and are always tied to HTML elements that are visible on the page, Atlas components (also consisting of JavaScript) might or might not have a graphical representation. One example of this is the Timer control, an instance of a component, which is not represented graphically on the page, as you’ll see when it is discussed in Chapter 1.

In this chapter, we will cover the behaviors and components that ship with Atlas and how to use them.

Using Behaviors

Atlas behaviors are similar to the behaviors introduced by Microsoft for Internet Explorer: you can attach a predefined Atlas behavior to an HTML element just as you can attach an Internet Explorer behavior. For instance, one behavior that ships with IE allows you to “do something when the mouse pointer hovers over an element,” such as a button, perhaps altering its color or font. The base Atlas library ships with the following behaviors:

  • Sys.UI.PopupBehavior ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Go Systems Programming

Go Systems Programming

Mihalis Tsoukalos

Publisher Resources

ISBN: 0596526725Supplemental ContentCatalog PageErrata