dropdown.settings.removeDropDown element


Removes a single option from the list. Nothing happens if the option passed as an argument is in fact not in the list.


newDropDown("value" , "Truth value")
    .settings.add( "True" , "False" )
newScale("logic",  "Binary","Three-valued")
    .settings.before( newText("Logic: ") )

Creates a drop-down list with two options, True and False, and prints it onto the page. Then creates a Scale element with two options, Binary and Three-value, the former being selected by default, preceded with the text Logic:. Whenever a value gets selected on the Scale, a test checks whether the selected value corresponds to Three-valued and, if so, it adds the option Other to the drop-down list, or removes it from the list otherwise.