i got this really simple loop:
function elapseddistance()
{
if ((cminutes) > (startminutes-1)) {
//do something i know it's working
}
var t;
t=setTimeout("elapseddistance()",100);
}
the loop take the actual time (cminutes) as minutes, calculated
elsewhere, and the theoric start time as minutes (calculated elsewhere
too), both as global variables
i got spy fields, so i can see that cminutes IS more than
startminutes, but if i try the loop without the if trap it works, with
the trap it didn't work despite of any value of cminutes and
startminutes
i fear this will be a really stupid error, but i'm coding for two
days, maybe i'm not as awaken as i need to be ;-)
many many thanks!
matteo
var cminutes = 5;
var startminutes = 2;
function elapseddistance() {
if ((cminutes) > (startminutes-1)) {
//do something i know it's working
var bob =1;
}
var t;
t=setTimeout("elapseddistance()",100);
}
// Main
function load() {
elapseddistance();