Please enable JavaScript to view this site.

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

JavaScript API: SearchField object > setOption()

Scroll Prev Next More

 

Selects an option for a search field in the search panel (CONTAINS, EQUALS, etc.).

Syntax

field.setOption(option);

Arguments

option

one of the available search options with the ASPRunnerPro.search.options prefix . Example: ASPRunnerPro.search.options.MORE_THAN, ASPRunnerPro.search.options.NOT_EMPTY.

Return value

No return value.

Example

Select the BETWEEN option for a search field using the JavaScript OnLoad event:

 

var srch = pageObj.getSearchController();
var field = srch.getSearchFields()[0];
field.setOption(Runner.search.options.BETWEEN);

See also:

JavaScript API: SearchController object (deprecated)

About Search API

Events: JavaScript OnLoad

JavaScript API: SearchField object

JavaScript API