Javascript dropdown selected value doesn't work in IE
<p>I have a javascript switch case statement to redirect the page or show/hide a text box depends on what user selects from the dropdown box value. It works fine in firefox but not IE. The error message is as below:
SCRIPT5007: Unable to get value of the property 'value': object is null or undefined 
_index.htm, line 67 character 7</p>

<p>switch (document.form.description.options[description.selectedIndex].value)  - IE is having a hard time with form.desciprition. </p>

<pre><code>&lt;script language="javascript"&gt;
 function fundsource()
   {
       var val;


       for (i=0; i&lt; document.form.description.length; i++)
       {

            switch (document.form.description.options[description.selectedIndex].value)

            {
                case "Select":
                    document.form.scholarship.style.visibility='hidden';
                    document.form.description_other.style.visibility='hidden';
                    break;
                case "Wall of Friends":
                    location.href= some url
                    break;
                case "Scholarship":
                    document.form.scholarship.style.visibility='visible';


                    break;
                case "Other":
                    document.form.description_other.style.visibility='visible';
                    document.getElementById("descriptionspan").style.visibility="visible";
                    break;


            }
       }
   }
&lt;/script&gt;
</code></pre>

<p>html code as below:</p>

<pre><code>&lt;tr&gt;
                    &lt;td align="right"&gt;Description of the Fund for Your Donation &lt;br /&gt;&lt;/td&gt;
                    &lt;td&gt;

        &lt;select name="description" id="description" onchange="fundsource()"&gt;
                        &lt;option&gt;Select&lt;/option&gt;
                        &lt;option&gt;Scholarship&lt;/option&gt;
                        &lt;option&gt;Rainbow of Life&lt;/option&gt;
                        &lt;option&gt;Wall of Friends&lt;/option&gt;
                        &lt;option&gt;General&lt;/option&gt;
                        &lt;option&gt;Other&lt;/option&gt;

                    &lt;/select&gt;
                    &lt;select name="scholarship" id="scholarship" style="visibility:hidden;"&gt;
                        &lt;option&gt;Alumni Scholarship&lt;/option&gt;
                        &lt;option&gt;Other&lt;/option&gt;
                    &lt;/select&gt;
                    &lt;/td&gt;
                  &lt;/tr&gt;
                   &lt;tr&gt;
                    &lt;td align="right" valign="top"&gt;&lt;div id="descriptionspan" alt="description" style="visibility:hidden;"&gt;Other, please specify:&lt;/div&gt;&lt;/td&gt;
                    &lt;td&gt;&lt;input type="text" name="description_other" size="50" alt="Fund Other" style="visibility:hidden;" /&gt;&lt;/td&gt;
                  &lt;/tr&gt;
</code></pre>

<p>I changed the document.form.description.options[description.selectedIndex].value to document.form.description.options[description.selectedIndex].text,  it still doesn't work. Please advise. TIA.</p>
