3 Replies Latest reply on Jul 2, 2007 6:45 AM by Nick201

    hide select box under menu

    Nick201 Level 1
      I am trying to hide select box under menu but it didn't work. any Q thanx
      <html>
      <script>
      var isIE4 = (document.all && !document.getElementById) ? true : false;
      var isIE5 = (document.all && document.getElementById) ? true : false;
      var isNS4 = (document.layers) ? true : false;
      var isNS6 = (!document.all && document.getElementById) ? true : false;

      function getElement(name){
      if(isNS4){ E = document.layers[name]; }
      else if(isIE4){ E = document.all[name]; }
      else if(isIE5 || isNS6){ E = document.getElementById(name); }
      return E;
      }

      function hideSelect(strName){
      var Element = getElement(strName);
      Element.style.display = "none";
      }

      function showSelect(strName){
      var Element = getElement(strName);
      Element.style.display = "";
      }
      </script>

      <form>
      <div id="container" style="position:relative;top:expression(this.offsetParent.scrollTop);">
      <BR /><BR />
      <div onchange="hideSelect('selectBox1');" onmouseout="showSelect('selectBox1');">show/hide</div>
      </div>
      <BR /><BR /><BR />
      <select id="selectBox1" name="selectBox1" style="display:;">
      <option value="abc">abc</option>
      <option value="abc">abc</option>
      </select>

      </form>
      </html>