Click to See Complete Forum and Search --> : onKeyPress ??


GSpan
02-05-2003, 12:18 PM
I'm using "onKeyPress" so the user can only type in numeric value "123456789", but this won't let the user use the delete or backspace keys.

HELP!
Thanks
Gary

khalidali63
02-05-2003, 01:29 PM
you need to do a bit of check b4 you do the numeric value check.

the key code for backspace = 8
and key code for delete key = 46.

if(keyCode !=8 && keyCode !=46){
/do your numeric value testing here
}

cheers

khalid

Zach Elfers
02-05-2003, 01:31 PM
khalidali, where can I get a list of the key codes?

khalidali63
02-05-2003, 01:33 PM
I am going to put a complete list of key codes in a new thread shortly.

cheers

Khalid

Zach Elfers
02-05-2003, 01:34 PM
ok