insertOption

jdubs edited this page Oct 23, 2016 · 1 revision

Table of Contents

Overview

This function inserts a new option in a SELECT list at the specific index location.

Signature

insertOption(index, text[,][,])

Parameters

( index ) The location to insert the new option. The items count begins at 0. ( text ) The display text associated with the option. ( value ) Optional. The value associated with the option. If omitted, value will be the same as text. ( selected ) Optional. A boolean representing whether the new item becomes the currently selected item in the SELECT list.

Example

spec['SelectList'].insertOption(2, 'New Item', '123456', false);

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.