tonkacoach
04-04-2002, 07:41 AM
Can someone tell me how to use the keypress event for a text box that will force users to, say, enter numbers only. It's easy
to do in VB, but I'm sure how to do it with javascript. I know the function should look something like this ...
function txtBox_onkepress() {
if (??? < 97) or (??? > 122) then;
keycode = 0;
end if;
}
I may be missing some stuff but you get the idea. I've tried event and keycode where the ???'s are. Any help would be great!!!!
Thanks!
John
to do in VB, but I'm sure how to do it with javascript. I know the function should look something like this ...
function txtBox_onkepress() {
if (??? < 97) or (??? > 122) then;
keycode = 0;
end if;
}
I may be missing some stuff but you get the idea. I've tried event and keycode where the ???'s are. Any help would be great!!!!
Thanks!
John