Microsoft HomeproductssearchsupportshopWrite Us   Microsoft Home
Magazine
 |  Community
 |  Workshop
 |  Tools & Samples
 |  Training
 |  Site Info

Workshop  |  Reusing Browser Technology

IHTMLDocument3::recalc Method


This document describes technologies available in the Internet Explorer 5 Beta. While we encourage you to evaluate these features and to send us your feedback, please note that these features are subject to change.

Recalculates all dynamic properties in the current document.

Syntax

HRESULT recalc(
    VARIANT_BOOL fForce
);

Parameters

fForce
Optional. If set to TRUE, this method will evaluate all expressions in the document. If set to FALSE, the default, only those expressions that reference properties that have changed since the last recalculation will be recalculated.

Return Value

Returns S_OK if the function was bound successfully, or an error value otherwise.

Remarks

Note For the current beta of Microsoft® Internet Explorer 5, implicit dependencies, internal property changes, and related properties may result in some expressions not being recalculated even though the properties they reference may have changed.

Implicit dependencies refer to properties that may be altered by changes in other properties. For instance, the height of a DIV is implicitly dependent upon the innerHTML of the DIV. However, if an expression references the height, a change in the innerHTML (which may alter the height) would not cause a recalculation of the expression on a subsequent call to recalc.

Internal property changes may not prompt recalculations of expressions referencing such properties on subsequent calls to recalc. For instance, resizing the main window changes document.body.clientWidth. Expressions that reference clientWidth may not get recalculated because the change may not be recognized.

Related properties are properties that access or manipulate data or behavior that is also accessed or manipulated by one or more other properties. For instance, both pixelLeft and posLeft set or retrieve the left position of the element. However, if an expression that references element.pixelLeft and element.posLeft is altered, the expression may not be recalculated on subsequent calls to recalc.

Related properties that may result in this behavior include:

clientHeight, clientLeft, clientTop, clientWidth, height, left, offsetHeight, offsetLeft, offsetTop, offsetWidth, pixelHeight, pixelLeft, pixelTop, pixelWidth, posHeight, posLeft, posTop, posWidth, top

To guard against these issues, authors should refer to the same property name or manually call recalc(true) to force recalculations of all expressions.

Dynamic properties behavior for the final release of Internet Explorer 5 will recognize and recalculate related properties, implicit dependencies, and internal property changes.


Does this content meet your programming needs? Write us!

Back to topBack to top

© 1998 Microsoft Corporation. All rights reserved. Terms of use.

 

Magazine Home
Ask Jane
DHTML Dude
Extreme XML
For Starters
More or Hess
Servin' It Up
Site Lights
Web Men Talking
Member Community Home
Benefits: Freebies & Discounts
Benefits: Promote Your Site
Benefits: Connect with Your Peers
Benefits at a Glance
Online Special-Interest Groups
Your Membership
SBN Stores
Join Now
Workshop Home
Essentials
Content & Component Delivery
Component Development
Data Access & Databases
Design
DHTML, HTML & CSS
Extensible Markup Language (XML)
Languages & Development Tools
Messaging & Collaboration
Networking, Protocols & Data Formats
Reusing Browser Technology
Security & Cryptography
Server Technologies
Streaming & Interactive Media
Web Content Management
Workshop Index
Tools & Samples Home
Tools
Samples, Headers, Libs
Images
Sounds
Style Sheets
Web Fonts
Training Home
SBN Live Seminars
SBN Live Chats
Courses
Peer Support
CD-ROM Training
Books & Training Kits
Certification
SBN Home
New to SBN?
What's New on SBN
Site Map
Site Search
Glossary
Write Us
About This Site