Posted on: 10/3/2014 5:45:56 PM | Views : 453

Hi there,

I want to be able to prevent certain characters being entered into a textbox with javascript. I currently have the below. keycode a is 65 but when I enter a in my textboxt it doesn't get suppressed

function IsFirstName(e) { if (e.which != 65) { e.preventDefault(); } }

I'm only doing the letter a right now as a proof of concept before writing the correct keycode logic I require. This fucntion is being run on the onkeyup event.

Go to the complete details ...