• Topic
  • Discussion
  • OATWikiWeb.OATDOCcombolist(Last) -- Owiki? , 2016-08-19 14:58:50 Edit owiki 2016-08-19 14:58:50


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


    OAT.Combolist(optList, defaultValue, optionsObject)

    Creates a combolist containing values from optListarray, 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


    OAT.Combolist::addOption(label, value)

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


    Clears all options.

    CSS classes


    CSS class of the combolist div.


    CSS class of the text input field option.


    CSS class of the regular option.


    CSS class of the option list.


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

    Referenced by...