setProperty |
Syntax
elemnt.setProperty(propertyName, value)
Parameters
Parameter |
Description |
---|---|
propertyName |
Required. Specifies the property to be set on element. propertyName should be one of the following: filter, mask, required, regExpr, charactercase, value, displayFormat, tooltip, help. |
value |
Required. Specifies the value of the property. For valid values of above properties see Validate. |
Return Value
No return value.
Remarks
The setProperty method is especially used to set the properties specified above dynamically on any element.
Example
The following example shows how setProperty method is used.
<div cordysType="wcp.library.ui.Calendar " id="cal" showTitle="false" style="position:absolute;display:none;width:150;height:137"></div> <div cordysType="wcp.library.util.Validate " > </div> <input id="calVal" fieldType="date" calendar="cal" filter="[\w +-/]" displayFormat="MM-DD-YYYY" ></input> //Call setProperty method. 'calVal' is the ID of the input element document.getElementById("calVal").setProperty("required", true);