beautypg.com

Identifybehaviorarguments() – Adobe Extending Dreamweaver CS4 User Manual

Page 249

background image

243

EXTENDING DREAMWEAVER CS4

Behaviors

Returns
Dreamweaver expects nothing.

identifyBehaviorArguments()

Description
This function identifies arguments from a behavior function call as navigation links, dependent files, URLs, Netscape
Navigator 4.0-style references, or object names so that URLs in behaviors can update if the user saves the document to
another location and so the referenced files can appear in the site map and be considered dependent files for the
purposes of uploading to and downloading from a server.

Arguments
theFunctionCall

This argument is the string that the

applyBehavior()

function returns.

Returns
Dreamweaver expects a string that contains a comma-separated list of the types of arguments in the function call. The
length of the list must equal the number of arguments in the function call. Argument types must be one of the following
types:

The

nav

argument type specifies that the argument is a navigational URL, and therefore, it should appear in the site map.

The

dep

argument type specifies that the argument is a dependent file URL, and therefore, it should be included

with all other dependent files when a document that contains this behavior is downloaded from or uploaded to a
server.

The

URL

argument type specifies that the argument is both a navigational URL and a dependent URL or that it is a

URL of an unknown type and should appear in the site map and be considered a dependent file when downloading
from or uploading to a server.

The

NS4.0ref

argument type specifies that the argument is a Netscape Navigator 4.0-style object reference.

The

IE4.0ref

argument type specifies that the argument is an Internet Explorer DOM 4.0-style object reference.

The

objName

argument type specifies that the argument is a simple object name, as specified in the

NAME

attribute

for the object. This type was added in Dreamweaver 3.

The

other

argument type specifies that the argument is none of the above types.

Example
This simple example of the

identifyBehaviorArguments()

function works for the Open Browser Window behavior

action, which returns a function that always has three arguments (the URL to open, the name of the new window, and
the list of window properties):

function identifyBehaviorArguments(fnCallStr) {

return "URL,other,other";

}

A more complex version of the

identifyBehaviorArguments()

function is necessary for behavior functions that

have a variable number of arguments (such as Show/Hide Layer). For this example version of the

identifyBehaviorArguments()

function, there is a minimum number of arguments, and additional arguments

always come in multiples of the minimum number. In other words, a function with a minimum number of arguments
of 4 may have 4, 8, or 12 arguments, but it cannot have 10 arguments:

This manual is related to the following products: