That makes sense David
But why should i write these many statements just because javascript doesnt understand the difference between a string and a number
var minValue=parseInt(document.getElementById(minField).value,10);
var maxValue=parseInt(document.getElementById(maxField).value,10);
if(isNaN(minValue))minValue=0;
if(isNaN(maxValue))maxValue=0;
The problem is parseInt treates empty string as NaN but I want that to be treated as 0 so i needed to write above 2 lines of code extra. (An end user doesnt care if he puts 0 or blank string when its not a mandatory field)
I know a blank string is 0 in case of integers but not javascript
sometimes we need to program in using roundabouts just because of the inconsistencies in programming language
I love programming but not this kind