Adobe 38040334 - Dreamweaver CS3 User Manual page 288

Api reference
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Example
The
dreamweaver.getBehaviorElement()
iorTag()" on page 283
to determine whether the selected action is appropriate for the selected HTML tag, except that
it gives you access to more information about the tag and its attributes. As shown in the following example, if you
write an action that can be applied only to a hypertext link (
you can use the
getBehaviorElement()
Parameters dialog box:
function initializeUI(){
var theTag = dreamweaver.getBehaviorElement();
var CANBEAPPLIED = (theTag.tagName == "A" && ¬
theTag.getAttribute("HREF") != null && ¬
theTag.getAttribute("TARGET") == null);
if (CANBEAPPLIED) {
// display the action UI
} else{
// display a helpful message that tells the user
// that this action can only be applied to a
// hyperlink without an explicit target]
}
}
dreamweaver.getBehaviorEvent() (deprecated)
Availability
Dreamweaver 1.2; deprecated in Dreamweaver 2 because actions are now selected before events.
Description
In a Behavior action file, this function gets the event that triggers this action.
Arguments
None.
Returns
A string that represents the event. This is the same string that is passed as an argument (
function.
Behavior()
dreamweaver.getBehaviorTag()
Availability
Dreamweaver 1.2.
Description
Gets the source of the tag to which the behavior is being applied. This function is applicable only in action files.
Arguments
None.
function can be used in the same way as
) that does not target another frame or window,
A HREF
function as part of the function that initializes the user interface for the
DREAMWEAVER CS3
API Reference
"dreamweaver.getBehav-
) to the
event
canAccept-
283

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents