I made this code:
$(".SermeCoopConvertirMayuscula").keypress(function (e) {
$(this).val($(this).val().toUpperCase());
regexp = /^[A-Z0-9 ]*$/;
return regexp.test($(this).val());
});
It is working fine. But when i type something it doesn't update my last inserted character. How can i make that the last character is added?
I need use the keypress event, i cant use the keyup event.