SOURCE CODE: setNodeValue on Multi-select


  setNodeValue on Multi-select | JavaScript Examples | UIZE JavaScript Framework

UIZE JavaScript Framework

JAVASCRIPT EXAMPLES setNodeValue on Multi-select

This example demonstrates how the setNodeValue instance method of the Uize.Widget base class can be used to conveniently set the value of a multi-select select tag (where its multiple attribute is set to 'multiple'). Clicking on the buttons above the select element will select different combinations of options by calling the setNodeValue method. The special value '' (empty string) clears the selection, and the special wildcard value '*' selects all options. Under the select element is a display of some of its state that is kept up-to-date. Currently selected options are reflected in the result of the page.getNodeValue ('select') method call. The value of the select element's value and selectedIndex properties are displayed as well, from which you will see that these properties of the element always reflect only the first of the selected options. In contrast, getNodeValue provides the values of all the selected options, bundled into an array.

Renewable Energy

page.getNodeValue ('select') ==

page.getNode ('select').value ==

page.getNode ('select').selectedIndex ==