I want to convert lowercase chars to uppercase as the user types using javascript. Any suggestions are welcome.
I have tried the following:
$("#textbox").live('keypress', function (e) {
if (e.which >= 97 && e.which <= 122) {
var newKey = e.which - 32;
// I have tried setting those
e.keyCode = newKey;
e.charCode = newKey;
}
});
css
#textbox{text-transform:uppercase}