I got a simple javascript function in my asp.net page that just checks to see if one value is smaller than the other. The condition value is 15000.00 and i'm comparing it to 920.00

Why does it evaluate to false?

var moo= 15000.00;
var orig= 920.00;
var bool = orig < moo;

if (bool) {
...some code here...
}

Note that this also doesn't work:

if (orig < moo) {
...some code here...
}

I got a simple javascript function in my asp.net page that just checks to see if one value is smaller than the other. The condition value is 15000.00 and i'm comparing it to 920.00

Why does it evaluate to false?

var moo= 15000.00;
var orig= 920.00;
var bool = orig < moo;

if (bool) {
...some code here...
}

Note that this also doesn't work:

if (orig < moo) {
...some code here...
}

Well, no idea but using it like this for now...

var moo= 15000.00;
var orig= 920.00;
var bool = moo / orig;

if (bool >= 1) {
...some code here...
}

why not try this:

var moo= 15000.00;
var orig= 920.00;
var bool = orig - moo;

if (bool < 0) {
...some code here...
}

why not try this:

var moo= 15000.00;
var orig= 920.00;
var bool = orig - moo;

if (bool < 0) {
...some code here...
}

Thnx for quick reply. But it's all the same to me now. Except if the subtraction calculation has performance advantages???

none really , did you try removing the var declaration ?

none really , did you try removing the var declaration ?

Which var declaration? No not that i can remember but it works great for now. Tnx