This is a snippet of a larger website I working on. All I am trying to do is some input validation. If the number they insert in a text box is greater then the max value(which is a attribute of the input box) display a tipsy error and grey out button etc. Well i can not figure out what is happening here.
>if(value>max)
>value:1 max:15 = No error
>
>value:2 max:15 = Error
>..... =Error
>
>value:10 max 15 = No error
So i took my code out of the website and put it in jsfiddle http://jsfiddle.net/V9xfj/
and it does it in there as well. Type in a 2 and you will get an error.
What am i doing wrong
2 is greater than 15 if they're strings or any other alpha sort
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With