Specifications
485
Arguments
NSorIE, tagObject
• NSorIE must be either "NS 4.0" or "IE 4.0". The DOM and rules for nested references
differ in Netscape Navigator 4.0 and Internet Explorer 4.0. This argument specifies for which
browser to return a valid reference.
• tagObject is a tag object in the DOM tree.
Returns
A string that represents a valid JavaScript reference to the object, such as
document.layers[’myLayer’].
• Dreamweaver returns correct references for Internet Explorer for A, AREA, APPLET, EMBED, DIV,
SPAN, INPUT, SELECT, OPTION, TEXTAREA, OBJECT, and IMG tags.
• Dreamweaver returns correct references for Netscape Navigator for A, AREA, APPLET, EMBED,
LAYER, ILAYER, SELECT, OPTION, TEXTAREA, OBJECT, and IMG tags, and for absolutely
positioned
DIV and SPAN tags. For DIV and SPAN tags that are not absolutely positioned,
Dreamweaver returns
"cannot reference <tag>".
• Dreamweaver does not return references for unnamed objects. If an object does not contain
either a
NAME or an ID attribute, Dreamweaver returns "unnamed <tag>". If the browser does
not support a reference by name, Dreamweaver references the object by index (for example,
document.myform.applets[3]).
• Dreamweaver returns references for named objects that are contained in unnamed forms and
layers (for example,
document.forms[2].myCheckbox).
dreamweaver.getPreferenceInt()
Availability
Dreamweaver MX
Description
Lets you retrieve an integer preference setting for an extension.
Arguments
section key default_value
• section a string that specifies the preferences section that contains the entry.
• key a string that specifies the entry of the value to be retrieved.
• default_value the default value that Dreamweaver returns if it cannot find the entry. Must
be an unsigned integer in the range 0 through 65,535 or a signed value in the range -32,768
through 32,767.
Returns
Integer value of the specified entry in the specified section, or the default value if the function
does not find the entry. Returns 0 if the value of the specified entry is not an integer.
Example
var snapDist = 5; //default value if entry not found
dreamweaver.setPreferenceInt("My Extension", "Snap Distance", snapDist);