Skip to content

addOptions

jdubs edited this page Oct 23, 2016 · 1 revision

Table of Contents

Overview

This function appends multiple new options to the end of a SELECT list.

Signature

addOptions(value[,])

Parameters

( value ) One or more of the following, in any combination:

  • An individual value representing the text and value of an option.
  • An array, where each item represents the text and value of an option.
  • A hash of key/value pairs, where each key represents and option text and value represents option value.

Example

spec['SelectList'].addOptions(1,2,3); // individual parameters
spec['SelectList'].addOptions([1,2,3]); // array
spec['SelectList'].addOptions({'one': 1, 'two': 2, 'three': 3}); // hash
spec['SelectList'].addOptions(1, [2, 3], {'four': 4}); // combination

Clone this wiki locally