Please enable JavaScript to view this site.

Navigation: Advanced topics > Programming topics > JavaScript API > Control object > Methods

JavaScript API: Control object > addStyle()

Scroll Prev Next More

 

Adds a style to the control.

Syntax

ctrl.addStyle(style);

Arguments

style

a CSS string with style definition. Example: 'width: 200px;'.

Return value

No return value.

Example

Add the style 'display: none;' to the control using the JavaScript OnLoad event:

 

var ctrl = Runner.getControl(pageid, 'Make');
ctrl.addStyle('display: none;');

See also:

JavaScript API: Control object > getControl()

JavaScript API: Control object > add CSS class

JavaScript API: Control object > remove CSS Class

Events: JavaScript OnLoad

JavaScript API: Control object

JavaScript API