title: Onfocus() event of Javascript is not calculating textbox value
body: <p>In my asp.net website I am trying to multiply two textbox value and store it into another textbox. But, my piece of code is not working</p>
  
  <p>The JS:</p>
  
  <pre><code>&lt;script language="javascript"&gt;
  function myFunction(x)
  {
  var x = document.getElementById("&lt;%=u_price1.ClientID %&gt;") * document.getElementById("&lt;%=qty1.ClientID %&gt;");
  return x;
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Textboxes:</p>
  
  <pre><code>&lt;asp:TextBox ID="u_price1" runat="server" Width="63px" CssClass="txt1"&gt;0&lt;/asp:TextBox&gt;
  
  &lt;asp:TextBox ID="qty1" runat="server" Width="63px" CssClass="txt1"&gt;0&lt;/asp:TextBox&gt;
  
  &lt;asp:TextBox ID="amt1" runat="server" Width="81px" CssClass="txt1" onfocus="myFunction(this)"&gt;&lt;/asp:TextBox&gt;
  </code></pre>
  
  <p>Please tell me whats wrong I am doing here.</p>