Dynamic Properties
Dynamic Properties
In this column we cover a feature that was first introduced in Internet Explorer 5: Dynamic Properties. This feature allows you to declare property values not only as constants, but also as formulas. The formulas can reference variables, functions, and property values from other elements. This ability to declare a property value as a function of a property value from other elements allows authors unique flexibility when designing their Web pages. You can now create impressive and clever Web pages by exploiting the capabilities of dynamic properties.
Typical examples for using dynamic properties are:
- A spreadsheet-like table that recalculates totals when a user enters a change in a cell. You can program, for example, an expense report form in which you have the days on the top and the expense items on the left. Your company will love it.
- Animation that is is based on dynamic properties instead of explicitly recomputing values every pre-defined time step.
- Animation that is based on a timer. If your application needs to recompute every pre-define time step, you can make its elements directly dependent on the time.
We demonstrate Dynamic Properties with a portion of the Solar System, including the Sun, the Earth, and the Moon. Most of the measurements are dynamic: the location of the sun with respect to the page, the distance between the earth and the sun, the distance between the moon and the earth, and the rotations' angular velocities.
In this column you will learn:
- What are the benefits of Dynamic Properties
- How to set a dynamic property
- How to get a dynamic property
- How to remove a dynamic property
- How to force a recalculation
- How to program the Solar System, Part I
- How to program the Solar System, Part II
We also provide you with the listings of the Solar System as well as its zipped format.
Next: What are the benefits of Dynamic Properties
Produced by Yehuda Shiran and Tomer Shiran
Created: July 18, 2000
Revised: July 18, 2000
URL: https://www.webreference.com/js/column65/index.html