This page is Not Ready

Notice: The WebPlatform project has been discontinued when the Stewards partnership agreement ended in September 2015. This site has been frozen, and the assets we have created will remain.

value (select, option element)

Applies to ?
## Examples

This example sets the value for each option element to a supply stock number.

function fnShowText(){
   /* Use the selectedIndex property of the SELECT control
   to retrieve the text from the options collection. */

   var sText = "Stock Number = " + oSel.options(oSel.selectedIndex).value;
<SELECT ID="oSel" onchange = "fnShowText()">
<OPTION VALUE="STK#45">Item One - Basketball</OPTION>
<OPTION VALUE="STK#347">Item Two - Baseball</OPTION>
<OPTION VALUE="STK#67">Item Three - Hockey Puck</OPTION>



Individual control objects return a value to the server only if they have been selected by the user. You may pass server-friendly data directly to the server without confusing the user. The user sees only the innerText displayed, and not the value.


Standards information

See also

Related pages

  • option
  • select