This property defines a visual effect that is used when the display is updated as the result of a change to the content of an element.
There are three kinds of filters that can be applied to an object.
Visual
Reveal
Blend
A visual filter is used to enhance the visual appearance of objects. For example, to flip them over, add a glow effect or a drop shadow.
A reveal filter is used to apply a transition effect as the appearance changes.
A blend filter controls the speed at which a reveal filter is applied.
You can define more than one filter, they just need to be space separated from one another.
Here is a list of the procedural filter function names:
AlphaImageLoader()
Gradient()
Here is a list of the static filters supported at version 5.5 of the MSIE browser:
Alpha()
BasicImage()
Blur()
Chroma()
Compositor()
DropShadow()
Emboss()
Engrave()
Glow()
Light()
MaskFilter()
Matrix()
MotionBlur()
Pixelate()
Shadow()
Wave()
The old blendTrans() and revealTrans() filters are now replaced by these transition filters:
Barn()
Blinds()
CheckerBoard()
Fade()
GradientWipe()
Inset()
Iris()
Pixelate()
RadialWipe()
RandomBars()
RandomDissolve()
Slide()
Spiral()
Stretch()
Strips()
Wheel()
Zigzag()
Filters are defined as if they were a sequence of space delimited function calls. They aren't really functions because their argument passing mechanism is not truly JavaScript based. Arguments to each filter function are defined as name=value pairs. These correspond to the properties and method invocations of the underlying filter object.
Refer to the specific topics on each filter function for details of what it does and how you can control it.
When using the filters in the context of the Style object, the function name for each filter must be preceded by this string:
"progid:DXImageTransform.Microsoft."
You can apply the filters directly as properties of the filter object that belongs to HTML element objects themselves.
Visual filters require that the target objects have enough layout information to enable the filter to work. This means they require height and width to be defined using absolute positioning or setting the contentEditable property flag to true.
Filters are not supported in all versions of MSIE on the Macintosh. In fact, they are not really well supported outside of the MSIE browser on the Win32 platform.
There are various sources of documentation about these filters. There is some difference between them regarding the spelling of the filters, names and the availability of the filters. The naming conventions are sometimes all lower case and at others a mixed upper and lower case. This suggests that the filter name parser may be case-insensitive. This also applies to the name=value pairs that are passed as arguments to the filter functions.
Certain filter functions are no longer included in the MSDN reference material and so they may be considered to be deprecated.
We have conformed to the case style of the MSDN reference and have included all the filters that were encountered in our source material. Those that appear not to be in the current MSDN reference are marked as deprecated as follows:
FlipH()
FlipV()
Grayscale()
Invert()
Mask()
XRay()
These are deprecated filters that used to provide blends and reveals:
BlendTrans()
RevealTrans()
Note that the functionality and availability of the filters has changed significantly from version 4.0 to version 5.5 of the MSIE browser.
The old functionality has not been lost. Instead, it has been reorganized and factored into the new filter suite. Nothing that you could have done before has been taken away but you will have to address the filters differently.
Prev | Home | Next |
style.emptyCells | Up | style.float |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |