Forum Moderators: open
if (parseInt(document.form1.form_disptopics.value)<"3") {return false;}
if (parseInt(document.form1.form_disptopics.value)>"75") {return false;}
I have added parseInt (after consulting my Javascript Bible) because I noticed that entering "0002" was returning "true".
But it seems that parseInt() is not what I am looking for since for example:
A/ "0076" return "true" (value after parseInt() being "62").
B/ "0762" return "true" (value after parseInt() being "498").
Any existing javascript function (similar to intval() in PHP) that return the absolute value of any number (Including numbers like "000025")
Thanks