Please enable JavaScript to view this site.

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

JavaScriptAPI: SearchController object > getSearchFields()

Scroll Prev Next More

 

Deprecated

SearchController object methods are deprecated, we recommend using Search API instead.

 

Returns search fields related to all fields or only the specified one.

Syntax

var fields = srch.getSearchFields(fieldName);

Arguments

fieldName

the name of the field. Example: 'Make'. This argument may be omitted.

Return value

If the argument is specified: returns the array of search fields related to the specified field.

 

If the argument is not specified: returns the array of search fields related to all fields.

Example

Get an array of SearchField objects for the Make field using the JavaScript OnLoad event:

 

var srch = pageObj.getSearchController();
var field = srch.getSearchFields('Make');
for(var i=0; i<field.length; i++){
// do something with SearchField objects
}

See also:

JavaScript API: SearchField object

About Search API

Events: JavaScript OnLoad

JavaScript API: SearchController object (deprecated)

JavaScript API

 

Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software