I tried that but it still entered the number that the user enters. I am using a function to check for numbers being entered using window.event.keycode. Here is what I have so far:
function checkKey
if (window.event.keyCode < 65) or (window.event.keyCode > 90) and (window.event.keyCode < 97) or (window.event.keyCode > 122) then
msgbox "Please enter only letters in this box.", vbCancel
else
end if
end function
The form contains the following:
<input type="text" name="Fname" id=fname size="20" onkeypress="checkKey"><P>
The problem is that I can't prevent the number from being displayed in the form. How do I program something behind the 'Cancel' button (vbCancel) to prevent the number from being accepted and displayed?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.