title: Clearing asp.net textbox using javascript not working
body: <p>I have a two textboxes in ASP.net.  When one is clicked on, I want the other to clear.</p>
  
  <p>Here is my code for the textboxes:</p>
  
  <pre><code>&lt;asp:TextBox runat="server" ID="box1" onfocus="clearBox2()"&gt;&lt;/asp:TextBox&gt;
  &lt;asp:Textbox runat="server" ID="box2"&gt;&lt;/asp:Textbox&gt;
  </code></pre>
  
  <p>And my javascript on the same page:</p>
  
  <pre><code>function clearBox2() {
       document.getElementById("&lt;%=box2.ClientID%&gt;").value = '';
   }
  </code></pre>
  
  <p>I don't know why but this isn't working.  I've managed to verify through chrome developer tools that the <code>value='';</code> line is being called.  I've also attempted toe erase it through jQuery like this:</p>
  
  <pre><code> $("#&lt;%=box1.ClientID%&gt;").focus(function(){
       alert("testing");
  });
  </code></pre>
  
  <p>But the alert doesn't get called.  Chrome developer tools isn't showing any javascript syntax errors.</p>
  
  <p>Would anyone happen to know what is happening?</p>