title: Unable to get value of the property 'click': object is null or undefined
body: <p>So I want a Button1 to be clicked when the submit button has been clicked.</p>
  
  <p>Here is the relevant code:</p>
  
  <pre><code>&lt;input id="Submit1" type="submit" value="Search" onclick="javascript:check_user()" /&gt; 
  &lt;script type="text/javascript"&gt;
              function check_user() {
                  document.getElementById('&lt;%=Button1.ClientID%&gt;').click();
              }  
  &lt;/script&gt;
  &lt;asp:Button id="Button1" runat="server" Visible="false" OnClick="Button1_Click"/&gt;
  </code></pre>
  
  <p>And here is the error I get:</p>
  
  <blockquote>
    <p>Microsoft JScript runtime error: Unable to get value of the property 'click': object is null or undefined</p>
  </blockquote>
  
  <p>Does anyone have any ideas as to what the problem might be? I've been tearing my hair out trying to work it out.</p>