Hi.
I am a bit of a newbie to JavaScript, so apologies in advance.
I am trying to validate a textbox to see if the value that is typed is of the following format:
23%
or
23
Basically, i am looking to return true or false if the numeric part is less than or equal to 100, and if the % sign is not present on the rhs simply validate that the number is a number.
I was thinking of using a regular expression, but could this be overkill?
Any suggestions are appreciated.
Regards.
MrPeds
I am a bit of a newbie to JavaScript, so apologies in advance.
I am trying to validate a textbox to see if the value that is typed is of the following format:
23%
or
23
Basically, i am looking to return true or false if the numeric part is less than or equal to 100, and if the % sign is not present on the rhs simply validate that the number is a number.
I was thinking of using a regular expression, but could this be overkill?
Any suggestions are appreciated.
Regards.
MrPeds