SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 1886 | Next

Joseph W. Lowery

"Dreamweaver CS3 Bible"

Define the behavior: A behavior is an automatic method for incorporating
a particular JavaScript function. The best way to begin building a
behavior is to write??”and, of course, debug??”that function. When
you create the Dreamweaver behavior, the function is incorporated into
the behavior??™s action file.
BC 25
IN THIS CHAPTER
Building a behavior: The basics
Working with the Document
Object Model
Exploring the Dreamweaver API
Streamlining your code with
common functions
Accessing useful behavior
techniques
Creating a Behavior
2. Create the action file: One of the key functions in Dreamweaver behaviors is, aptly enough,
behaviorFunction(), which inserts your function into the section of the Web page.
Dreamweaver enables you to include multiple functions as well as single ones.
3. Build the user interface: As you look through the standard Dreamweaver behaviors, you see a
dialog box that acts as the user interface in all but a few instances. The user interface that you create
is based on HTML forms and is alternatively referred to as a parameter form and seen by the
user as a dialog box.
4. Apply the behavior: Both an event and an action are required to make up a behavior. The
applyBehavior() function ties the new function to a specific tag and event.


Pages:
1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898