on focus not working in asp textbox
<p>On entering rate and quantity I want the total amount to be calculated automatically, so I tried the following.</p>

<pre><code>function getAmt()
{   
    if(isNaN(document.getElementById('&lt;%=TxtRate.ClientID%&gt;').value))
    {
        alert("Illegal Rate Entered, Please Check It Out.");
        document.getElementById('&lt;%=TxtRate.ClientID%&gt;').focus;

        return;
    }
    else if(isNaN(document.getElementById('&lt;%=TxtQty.ClientID%&gt;').value))
    {
        alert("Illegal Quantity Entered, Please Check It Out.");
        document.getElementById('&lt;%=TxtQty.ClientID%&gt;').focus;

        return;
    }   
    document.getElementById('&lt;%=TxtAmt.ClientID%&gt;').value=parseFloat
        (document.getElementById('&lt;%=TxtRate.ClientID%&gt;').value)*parseFloat
        (document.getElementById('&lt;%=TxtQty.ClientID%&gt;').value)
}
</code></pre>

<p>Now I created a text box:</p>

<pre><code>&lt;TextBox ID="TxtAmt" runat="server" BorderStyle="Solid" onFocus="getAmt()"&gt;
</code></pre>

<p>This code is not running.. what am i missing ??</p>
