User Guide
372 Page Content
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
(
event) to the canAcceptBehavior() function.
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.
Returns
A string that represents the source of the tag. This is the same string that passes as an
argument (
HTMLelement) to the canAcceptBehavior() function. If this function appears
outside an action file, the return value is an empty string.
Example
If you write an action that can be applied only to a hypertext link (A HREF), you can use the
getBehaviorTag() function, as the following example shows, in the function that initializes
the user interface for the Parameters dialog box:
function initializeUI(){
var theTag = dreamweaver.getBehaviorTag().toUpperCase();
var CANBEAPPLIED = (theTag.indexOf('HREF') != -1));
000_DW_API_Print.book Page 372 Wednesday, July 20, 2005 11:58 AM