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
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.