I'm trying to make a JavaScript program where you enter a numeric value into an input field, and then the program returns a message based on what number you entered.
There are two main parameters with the number input field I want to have:
1. The number you enter in the field must be between 0-100, and if it's not then an alert will be called telling you to enter a proper value.
I have done that, but it's the next parameter I'm having trouble with.
2. You may only enter numeric values into the input field. If you don't (e.g. you enter an alphabetical character) then an alert will be called saying that you may only enter numbers.
Both of these parameters are checked off when the user clicks a button; the button calls some functions that do this. I'm having problems with the second parameter, however.
I can't figure out how I can get the program to look at the what the user typed and determine if any values in it are alphabetical characters (letters).
So, to recap, my overall question is this: How can I check if any characters that are inputted into a number field are alphabetical letters, through a function that is called with a button?
If my question is confusing at all please tell me and I will try to clarify. Any help would be greatly appreciated. Thanks.