The rules that are used to construct a style are comprised of multiple expressions. You can use this method to assign a new value to an expression within a style item with that value being generated by a callback to a script function.
The rule might contain a line such as:
width:200px
The setExpression() method can be applied to the style object containing the rule with that expression like this:
myStyle.setExpression("width:", "callBack()", "JavaScript")
The value of the width parameter would be defined by the result of calling the callBack() function in the JavaScript context.
The language argument can be one of the following:
JavaScript
JScript
VBScript
Prev | Home | Next |
Element.setCapture() | Up | Element.sourceIndex |
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. |