This is used to set the values for expressions within the style handling complex. You can later retrieve the value of these expressions with the getExpression() method or delete them with the removeExpression() method.
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.
Given 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 then be defined by the result of calling the callBack() function in the JavaScript context.
The expressions are attached to style properties and can be executed in a variety of languages. The language argument can be one of the following:
JavaScript
JScript
VBScript
Prev | Home | Next |
style.setAttribute() | Up | style.size |
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. |