Electric Type

Multimedia

About Us

News

Help

Getting in on the Action Sheets

Page 3 — The Cascading Action System

The majority of the Note revolves around what the authors call the Cascading Action System (CAS). This is simply an example Action System, and is fully defined in Appendix 2 of the Note. At a basic level, the Cascading Action System is simply an application of CSS-derived concepts to the realm of scripting languages.

For example, selectors under CAS are defined to be identical to those in CSS2, both in their scope and their flexibility. Class selectors, ID selectors, element selectors, and selector grouping are all exactly the same as you would expect under CSS2. Thus, you could define a hover-style effect for anchors by declaring:

A *[HREF] {onMouseOver: "this.style.fontColor = 'cyan'";}

Of course, there are differences in the rules for scripting actions. Instead of CSS properties, there are actions such as onMouseOver, as seen in the above example. As a matter of fact, the possible actions (the action domain for CAS) are the event handlers defined in HTML 4.0:

CAS Event Handlers
onLoad
onUnload
onCLick
onDblClick
onMouseDown
onMouseUp
onMouseOver
onMouseMove
onMouseOut
 
onFocus
onBlur
onKeyPress
onKeyDown
onKeyUp
onSubmit
onReset
onSelect
onChange

As for the structure of a CAS Action Sheet itself, it's amazingly simple. There are only three CAS tags defined in the Note: actionsheet, action, and script. Of these, only the last two accept any attributes.

For action, the possible attributes are type, which is used to define the Action System in use, and codetype, the value of which is the name of a scripting language such as text/javascript.

In the case of script, there are three attributes: type, which is the same as codetype is for action, src, which can be used to give the URI of a document contained scripts, and charset, which specifies the character encoding of the script; for example, charset="iso-8859-1", which would define the script's character set to the the Latin-1 charset, the most common set in use on the Web.

But enough theory, let's see CAS in action (if you'll pardon the pun).

next page»


Dynamic HTML  

Frames  

HTML Basics  

Stylesheets  

Tables  

XML  

Javascript  

Database Connections  

Intro To Perl  

HTML 4.0  

User Blogs

Screen Shots

Latest Updates

Contact Us

Valid HTML 4.01!
Valid CSS!

Breadcrumb

© ElectricType
Maintained by My-Hosts.com
Site map | Copyright | Disclaimer
Privacy policy | Acceptable Use Policy
Legal information.