Validate login by pressing enter key
$(“#username, #password”).keydown(function(event) {
// track enter key
var keycode = (event.keyCode ? event.keyCode : (event.which ? event.which : event.charCode));
if ( keycode == 13) { // key code for enter key
// force the keyboard ‘Enter Key’ to implicitly click the Update button
validateLogin();
return false;
} else {
return true;
}
}); // end of function