Show text when a dropdown option is selected
<p>I am trying to figure out a way to display a some text based on the drop down item selected by the user, in the "result" div below. I know how to do this with a normal input field but I am having trouble understanding how to pass in "option values" into the javascript function. This is what I tried so far...</p>

<p>In the code below, I am simply trying to successfully pass whatever drop down item value is selected into the javascript function and print out the name of that value in the "result" div... once I am able to do that, I will implement the 'tip' feature described above.</p>

<p>My Markup:</p>

<pre><code>&lt;select onChange="dropdownTip(this.value)" name="search_type" style="margin-right:10px; margin-top:2px;"&gt;
    &lt;option selected="selected" value="fruit_search"&gt;fruits&lt;/option&gt;    
    &lt;option value="veggies_search"&gt;veggies&lt;/option&gt;
    &lt;option value="animals_search"&gt;animals&lt;/option&gt;
    &lt;option value="all_search"&gt;all&lt;/option&gt;
&lt;/select&gt;

&lt;div id="result"&gt;&lt;/div&gt;
</code></pre>

<p>My JavaScript:</p>

<pre><code>&lt;script type="text/javascript"&gt;
    function dropdownTip(value){
        document.getElementByID("result").innerHTML = value;
    }
&lt;/script&gt;
</code></pre>
