Index | OAT homepage | OpenLink Software

# OATDOCcombolist

- OATDOCcombolist
- _ _ combolist.js
- _ _ _ _ Objects
- _ _ _ _ _ _ OAT.Combolist(optList, defaultValue, optionsObject)
- _ _ _ _ Methods
- _ _ _ _ _ _ OAT.Combolist::addOption(label, value)
- _ _ _ _ _ _ OAT.Combolist::clearOpts()
- _ _ _ _ CSS classes
- _ _ _ _ _ _ .combo_list
- _ _ _ _ _ _ .combo_list_input
- _ _ _ _ _ _ .combo_list_option
- _ _ _ _ _ _ .combo_list_list
- _ _ _ _ Example

## combolist.js

Creates a combolist, <select> with additional possibility of direct user input.

### Objects

#### OAT.Combolist(optList, defaultValue, optionsObject)

Creates a combolist containing values from
`optList` array, with a value of `defaultValue`.
Its main div is accessible as `OAT.Combolist::div` .
Onchange callback may be set via `OAT.Combolist::onchange` property. `optionsObject` may contain:

- `name` - html name attribute for relevant input tag
- `imagePath`

### Methods

#### OAT.Combolist::addOption(label, value)

Adds a new option labeled `label` with value of `value` . If `value` is not specified, `label` is used instead.

#### OAT.Combolist::clearOpts()

Clears all options.

### CSS classes

#### .combo_list

CSS class of the combolist div.

#### .combo_list_input

CSS class of the text input field option.

#### .combo_list_option

CSS class of the regular option.

#### .combo_list_list

CSS class of the option list.

### Example

     var cl = new OAT.Combolist([],"default",{name:"myName"});
    document.body.appendChild( cl.div );
    cl.addOption("option 1");
    cl.addOption("option 2","value 2");

Copyright (C) 2005-2008 OpenLink Software