I currently have a Log In screen and I disable the Login button until the user has entered their account # and last 4 of their SSN. It works fine so long as the user manually enters this information. However, I run into an issue if the user decides to use auto-complete to fill out the form because they must then tab off of the input field in order for it to register that the input has been entered and enable the Login button.
Is there a way I can automatically enable the LogIn button (assuming the data is correct) as soon as the user auto-completes everything? This is what I have so far:
$("input[type=text], input[type=password]").on("keyup", enableLogIn);
$("input[type=text], input[type=password]").bind("paste", enableLogIn);
function enableLogIn() {
if ($("#AccountNumber").val().length < 6 || $("#SocialSecurityNumber").val().length < 4) {
$("#loginButton").attr("disabled", true);
} else {
$("#loginButton").attr("disabled", false);
}
}