Inserting multiple functions in the user's file

Actions can insert multiple functions—the main behavior function plus any number of helper functions—into the HEAD. Two or more behaviors can even share helper functions, as long as the function definition is exactly the same in each action file. One way of ensuring that shared functions are identical is to store each helper function in an external JavaScript file and insert it into the appropriate action files using <SCRIPT SRC="externalFile.js">.

When the user deletes a behavior, Dreamweaver will attempt to remove any unused helper functions associated with the behavior. If other behaviors are using a helper function, it will not be deleted. Because the algorithm for deleting helper functions errs on the side of caution, Dreamweaver may occasionally leave behind an unused function in the user's document.