title: ASP.NET control with visible=false cannot be used in javascript?
body: <p>I have an ASP.NET text control  "FromDate" whose visible property is set to false, but I wanted a client side javascript to be able to toggle the visibility property using CSS properties</p>
  
  <pre><code>element1.style.display = "none"; // hides the element
  element1.style.display = ""; // shows the element
  </code></pre>
  
  <p>but when I attempt to get the textbox, I get null on </p>
  
  <pre><code>  var element1 = document.getElementById("FromDate");
  </code></pre>
  
  <p>When I try the same code with visble=true as the default on the "FromDate" ASP.NET control, it works (although that is not the behavior I need)</p>
  
  <p>Any ideas?</p>