I have 3 textbox
Quantity
Rate
Total
I want a key press event that when i type any amount in Rate then the total should be calculated.I have a option of text change Event but that is fired when i leave the textbox. I want to have Key press event of textbox. I have following code.
$('#<%=txtRate.ClientID %>').keypress(function (event) {
alert($('#<%=txtRate.ClientID %>').val());
});
Problem i am facing is when i get the alert it does not show me the current pressed value.
means if i have value in textbox 1 and if i press 2 then it will just alert me 1 as the event fires when i click. so the present value is not recorded.
To immediately detect the current click one must use the
.keyup()event