I am trying to prevent users from typing certain characters in text boxes and this is the code that I have so far :
$().ready(function(){
$(".textbox").keypress(function(event)
{
var keyVal = event.keyCode;
if((keyVal > 48 && keyVal < 57))// Numbers
{
return false;
}
});
});
It is entering the event and the condition but the character is still inserted. Any ideas on how I go about this?