[ad_1]
Hello @hheyhey568
The do/while loops in javascript have no problems by themselves. The problem is the way you use it. The browser evaluates the do/while loop while the condition is true.
Unfortunately, you do not include the equation. But assuming it uses two fields, fieldname1 and fieldname2, and you want to evaluate the loop only if the fields values are greater than or equal to zero. The equation structure would be similar to:
(function(){
if(AND(0<=fieldname1, 0<=fieldname2)) {
/* YOUR LOOP HERE */
} else {
alert('The fields values are invalid');
}
})()Best regards.
