Select object value
<p>I just saw the following:
<a href="http://www.w3schools.com/jsref/prop_option_value.asp" rel="nofollow">http://www.w3schools.com/jsref/prop_option_value.asp</a></p>

<p>And wonder if there's something wrong with <em>selectObject.value</em>. Why not a simple approach:</p>

<pre><code>&lt;!DOCTYPE html&gt;
    &lt;html&gt;
        &lt;head&gt;
            &lt;script type="text/javascript"&gt;
                function displayResult(){
                    alert(document.getElementById("mySelect").value);
                }
            &lt;/script&gt;
        &lt;/head&gt;
    &lt;body&gt;
        &lt;form&gt;
            Select your favorite fruit:
            &lt;select id="mySelect"&gt;
                  &lt;option value="apple"&gt;Apple&lt;/option&gt;
                  &lt;option value="orange"&gt;Orange&lt;/option&gt;
                  &lt;option value="pineapple"&gt;Pineapple&lt;/option&gt;
                  &lt;option value="banana"&gt;Banana&lt;/option&gt;
            &lt;/select&gt;
        &lt;/form&gt;
        &lt;button type="button" onclick="displayResult()"&gt;
            Display value of selected fruit
        &lt;/button&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>It seems to be working with no problem.</p>

<p>Thanks in advance!</p>

<p>Mike</p>
