Please enable JavaScript to view this site.

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

JavaScript API: SearchField object > addOption()

Scroll Prev Next More

 

Adds an option to the list of search options in the search panel (CONTAINS, EQUALS, etc.).

Syntax

field.addOption(option);

Arguments

option

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

Return value

No return value.

Example

Add the EMPTY option to the list of search options using the JavaScript OnLoad event:

 

var srch = pageObj.getSearchController();
var field = srch.getSearchFields()[0];
field.addOption(ASPRunner.NET.search.options.EMPTY);

See also:

JavaScript API: SearchController object (deprecated)

About Search API

Events: JavaScript OnLoad

JavaScript API: SearchField object

JavaScript API