title: getElementByID when script is external
body: <p>I am trying to access a asp:panel in an external script to make it not visible,but it does not seem to be working. When the Script is in the .aspx file it works fine though.Any suggestions?</p>
  
  <p>In the .aspx file</p>
  
  <pre><code>  &lt;script src="App_Themes/custom.js"&gt;&lt;/script&gt;
    &lt;asp:Button ID="descriptionButton" Text="Description" runat="server" OnClientClick="descButton(); return false;" /&gt;
  
   &lt;asp:Panel ID="desciptionPanel" runat="server"&gt; 
            ///random stuff
                 &lt;asp:panel&gt;
  </code></pre>
  
  <p>in the custom.js file</p>
  
  <pre><code>function descButton() {
  
  var desc = document.getElementById('&lt;%=desciptionPanel.ClientID%&gt;'); 
  desc.style.visibility = "visible";
  desc.style.height = "800px";
  
  }
  </code></pre>
  
  <p>Thanks in advance</p>