Javascript Working in FF + IE9 but not IE8
<p>As the title says, my code works in the latest Firefox and IE9 but not IE8. Could anyone tell me why? Or perhaps give me another solution to hiding/showing a div based on a selected element. Thanks</p>

<pre><code>&lt;script type="text/javascript"&gt;
&lt;!--
    /* Hide drop down if certain option selected */
    function hideField(field_id){
        var field = document.getElementById(field_id);
        field.style.display = "none";
    }
    /* Show drop down if certain option selected */
    function showField(field_id){
        var field = document.getElementById(field_id);
        if(field.style.display = "none"){
            field.style.display = "block";
        }
    }
--&gt;
&lt;/script&gt;


                    &lt;select name="subject" id="subject" &gt;
                        &lt;option value="unselected"&gt;Please Select...&lt;/option&gt;
                        &lt;option value="Advertising" onclick="hideField('browserRow'),hideField('versionRow')"&gt;Advertising&lt;/option&gt;
                        &lt;option value="Complaint" onclick="hideField('browserRow'),hideField('versionRow')"&gt;Complaint&lt;/option&gt;
                        &lt;option value="Content Issue" onclick="hideField('browserRow'),hideField('versionRow')"&gt;Content/Information&lt;/option&gt;
                        &lt;option value="Website Error" onclick="showField('browserRow'),showField('versionRow')"&gt;Website Bug/Error&lt;/option&gt;
                        &lt;option value="Website Feedback" onclick="hideField('browserRow'),hideField('versionRow')"&gt;Website Feedback&lt;/option&gt;
                        &lt;option value="Other" onclick="hideField('browserRow'),hideField('versionRow')"&gt;Other&lt;/option&gt;
                    &lt;/select&gt;

            &lt;div class="row" id="browserRow"&gt;
                &lt;label&gt;Your Browser: &lt;font color="#FF0000"&gt;*&lt;/font&gt;&lt;/label&gt;
                &lt;select name="browser" id="browser"&gt;
                    &lt;option value="unselected"&gt;Please Select...&lt;/option&gt;
                    &lt;option value="Android"&gt;Android&lt;/option&gt;
                    &lt;option value="Google Chrome"&gt;Google Chrome&lt;/option&gt;
                    &lt;option value="Mozilla Firefox"&gt;Mozilla Firefox&lt;/option&gt;
                    &lt;option value="Internet Explorer"&gt;Internet Explorer&lt;/option&gt;
                    &lt;option value="Safari"&gt;Safari&lt;/option&gt;
                    &lt;option value="Opera"&gt;Opera&lt;/option&gt;
                    &lt;option value="Other"&gt;Other&lt;/option&gt;
                &lt;/select&gt;
             &lt;/div&gt;

            &lt;div class="row" id="versionRow"&gt;
                &lt;label&gt;Browser Version: &lt;font color="#FF0000"&gt;*&lt;/font&gt;&lt;/label&gt;
                &lt;input type="text" name="version" value="&lt;?php echo $session-&gt;userinfo['version']; ?&gt;" maxlength="10" id="bVersion"&gt;
                &lt;span class="error"&gt;&lt;?php echo $form-&gt;error("version"); ?&gt;&lt;/span&gt;
                &lt;script language="javascript"&gt;
                    var number = document.getElementById('version');
                    selectItemByValue(number, '&lt;?php echo $form-&gt;value('version'); ?&gt;');
                &lt;/script&gt;
            &lt;/div&gt;
</code></pre>
