Cannot clear textbox after keypress event
<p>I know this questions is all over the place, but this is driving me crazy!!!</p>

<p>Here is my code:</p>

<pre><code>$(document).ready(function () {

        $('#MainContent_LoginUser_Password').keypress(function (e) {

            noCapsLock($('#MainContent_LoginUser_Password'), e, "Please turn off Caps Lock");
        });

    });
function noCapsLock(o, e, str) {
var s = String.fromCharCode(e.which);
if (s.toUpperCase() === s &amp;&amp; s.toLowerCase() !== s &amp;&amp; !e.shiftKey) {
    alert(str);
    o.val('');

}     
}
</code></pre>

<p>I am trying to clear the value of the textbox with the given id.  The code above clears the text, but when a new key is pressed, the value of that key is shown (uppercase letters).
I have tried the change(), keyup(), keydown() functions but they still do not seem to clear the textbox of the last value entered.</p>

<p>Any help will be appreciated.  Thank you!</p>
