I need loading spped how can the number of lines be reduced

admin

Administrator
Staff member
I know this will process slow, but i need to somehow reduce teh number of lines of code... can you help?

function CalcIt ()
{
with (document.f8)
{
for(var n = 0; n < ad1.length; n++)
{
var val1 = (ad1[n].checked) ? parseInt(document.f8.ad1[n].value) : 0 ;
if (val1 != 0) break;
}

var ilt = val1
+ (ad2.checked ? parseInt(ad2.value) : 0)
+ (ad2.checked ? parseInt(ad3.value) : 0)
+ (ad2.checked ? parseInt(ad4.value) : 0)
ilt = ilt > 17 ? 17 : ilt ;
}
}
 
Back
Top