Operation Manual
105
USING DREAMWEAVER
Managing assets and libraries
Last updated 3/28/2012
When you create a library item that includes an element with a Dreamweaver behavior attached to it, Dreamweaver
copies the element and its event handler (the attribute that specifies which event triggers the action, such as
onClick,
onLoad, or onMouseOver, and which action to call when the event occurs) to the library item file. Dreamweaver does
not copy the associated JavaScript functions into the library item. Instead, when you insert the library item into a
document, Dreamweaver automatically inserts the appropriate JavaScript functions into the
head section of that
document (if they aren’t already there).
Note: If you hand-code JavaScript (that is, if you create it without using Dreamweaver behaviors), you can make it part
of a library item if you use the Call JavaScript behavior to execute the code. If you don’t use a Dreamweaver behavior to
execute the code, the code isn’t retained as part of the library item.
There are special requirements for editing the behaviors in library items. Library items cannot contain style sheets,
because the code for those elements is part of the
head section.
More Help topics
“Edit a behavior in a library item” on page 114
Working with assets
Assets panel overview
Use the Assets panel (Window > Assets) to manage assets in the current site. The Assets panel displays assets for the
site associated with the active document in the Document window.
Note: You must define a local site before you can view assets in the Assets panel.
Asset panel with Site list displayed. Category icons are at left, and preview area is above list.
The Assets panel provides two ways to view assets:
Site list Shows all of the assets in your site, including colors and URLs that are used in any document in your site.
Favorites list Shows only the assets you’ve explicitly chosen.
To switch between these two views, select either the Site or Favorites radio button above the preview area. (These two
views are not available for the Templates and Library categories.)
Note: Most of the Assets panel operations work the same in both lists. There are a few tasks, however, that you can
perform only in the Favorites list.