title: Why html checkbox function only works in IE but not in Firefox or Chrome?
body: <p>I'm debugging a JavaScript/JSP/Struts app, it has a checkbox, for advanced search, when it's checked, other 2 items are supposed to show up on the page for user to enter more info, yet this only works in IE, but not Firefox or Chrome, no response at all when it's checked on the other 2 browsers, why ? And how to make it work in all browsers ?</p>
  
  <p><img src="https://i.stack.imgur.com/x3DcC.png" alt="enter image description here"></p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function checkAdvSearch(checked) {      
          if(checked) {
              document.getElementById("searchTerm2").style.display = '';
              document.getElementById("searchField2").style.display = '';
          }else {
              document.getElementById("searchTerm2").style.display = 'none';
              document.getElementById("searchField2").style.display = 'none';
              document.getElementById("searchLOB").style.display = 'none';
  
              document.getElementById("searchTerm2").value = '';
              document.getElementById("searchField2").value = 'clientName';
              document.getElementById("searchStatus").value = '';
              document.getElementById("searchLOB").value = '';
          }
      }
  &lt;/script&gt;
  
  ...
  &lt;!-- for advanced search --&gt;
    &lt;td Valign=top width=300&gt;
      &lt;input type="checkbox" name="advSearch" onclick="checkAdvSearch(this.checked);" tabindex="5"/&gt;Advanced Search
      &lt;html:text property="searchTerm2" value="" style="display:none" tabindex="6"/&gt;
    &lt;/td&gt;
    &lt;td Valign=top width=178&gt;
      &lt;html:select property="searchField2" onchange="showOptions2(this.form)" value= "" style="display:none" tabindex="7"&gt;
        &lt;html:option value="clientName"&gt;Insured Name&lt;/html:option&gt;
        &lt;html:option value="policy"&gt;Policy Number&lt;/html:option&gt;
          ...
      &lt;/html:select&gt;
    &lt;/td&gt;
  ...
  </code></pre>