onkeypress textbox issue
<p>I have this:</p>

<pre><code>&lt;input type="text" ID="txtMy" name="txtMy" onkeypress="initialize();"/&gt;
</code></pre>

<p>And in my .js file I have:</p>

<pre><code>initialize()
{
    var x = $("#txtMy").val();
}
</code></pre>

<p>But, if I have '2' in my textbox, and then I enter 4, the value of x is still 2. How to resolve this?</p>
