Export (0) Print
Expand All
2 out of 11 rated this helpful - Rate this topic

recalc method

This element is obsolete and should no longer be used. Recalculates all dynamic properties in the current document.

Syntax

var retval = document.recalc(fForce);

Parameters

fForce [in, optional]

Type: Boolean

A Boolean that specifies one of the following values.

false (false)

Default. Recalculates only those expressions that have changed since the last recalculation.

true (true)

Recalculates all expressions in the document.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Standards information

There are no standards that apply here.

Remarks

Implicit dependencies, internal property changes, and related properties can cause some expressions not to recalculate, even though the referenced properties might have changed. For example, resizing the main window changes the clientWidth property. Expressions that reference clientWidth might not be recalculated, because the change might not be recognized.

Implicit dependencies refer to properties that can be modified by changes in other properties. For example, the height property of a div object implicitly depends on the innerHTML property of the div object. However, if an expression references the height property, a change in the innerHTML property, which might modify the height, does not cause a recalculation of the expression on a subsequent call to recalc.

Related properties can access or manipulate data or behaviors through one or more other properties. For example, pixelLeft and posLeft can set or get the left position of the element. However, if an expression that references pixelLeft and posLeft is modified, the expression might not be recalculated on subsequent calls to recalc.

Related properties that can cause this behavior include the following: clientHeight, clientLeft, clientTop, clientWidth, height, left, offsetHeight, offsetLeft, offsetTop, offsetWidth, pixelHeight, pixelLeft, pixelTop, pixelWidth, posHeight, posLeft, posTop, posWidth, and top.

To force the recalculation of all expressions, refer to the same property name or manually call recalc(true).

See also

document
Reference
getExpression
removeExpression
setExpression
Conceptual
About Dynamic Properties

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.