Possible Duplicate:
Detect all changes to a <input type=“text”> (immediately) using JQuery
I have a textbox which a user enters data and on the onBlur event it does an AJAX request to validate the data they have entered. If it validates then a button becomes enabled. However users are getting confused that they have to tab out or click somewhere on the page for the button to become enabled.
Is there an alternative event or approach to the code I am using?
$('.serial').live('blur', function () {
//Do AJAX to validate
//If ok enable button
$('#button').attr("disabled", "");
});
You could use keyup, maybe adding a setTimeout for delaying the requests.
Try keyup - it's fired after each key is pressed.
$('.serial').live('keyup', function () {
//Do AJAX to validate
//If ok enable button
$('#button').attr("disabled", "");
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With