var check=SSI_GetValue("kmcurrent_1_other"); if(isNaN(check)) { var strErrorMessage="Answer must be numeric"; } if(SSI_GetValue("kmcurrent_1_other") < SSI_GetValue("kmpurchased_1_other")) {strErrorMessage = "You cannot have less km today than when the car was purchased";}

The first part of this code, checking if respondents' answer is numeric, works flawlessly (thanks to a previous answer I got on this forum). The second part however, aiming at comparing the number of km today with number of km when purchased does no give any results, despite this method being from a previous post on this forum (https://www.sawtoothsoftware.com/forum/1738/javascript-validation-comparing-values-numeric-text-boxes).

Note that I am using version 8.3.4 hence the SSi_GetValue function should work.

Any idea where the mistake is hidden?