Widget:DVT Wells score calculator: Difference between revisions

Jump to navigation Jump to search
Ssharfaei (talk | contribs)
No edit summary
Ssharfaei (talk | contribs)
No edit summary
Line 3: Line 3:
function calcScore(){
function calcScore(){
var score = 0;
var score = 0;
if(document.forms["DVTCalc"]["input1"].checked == 1){
if(document.forms["DVTCalc"]["input1"].checked == 1){score += 1;}
score += 1;
if(document.forms["DVTCalc"]["input2"].checked == 1){score += 1;}
}
if(document.forms["DVTCalc"]["input3"].checked == 1){score += 1;}
 
if(document.forms["DVTCalc"]["input4"].checked == 1){score += 1;}
if(document.forms["DVTCalc"]["input2"].checked == 1){
if(document.forms["DVTCalc"]["input5"].checked == 1){score += 1;}
score += 1;
if(document.forms["DVTCalc"]["input6"].checked == 1){score += 1;}
}
if(document.forms["DVTCalc"]["input7"].checked == 1){score += 1;}
if(document.forms["DVTCalc"]["input3"].checked == 1){
if(document.forms["DVTCalc"]["input8"].checked == 1){score += 1;}
score += 1;
if(document.forms["DVTCalc"]["input9"].checked == 1){score += 1;}
}
if(document.forms["DVTCalc"]["input10"].checked == 1){score -= 2;}
if(document.forms["DVTCalc"]["input4"].checked == 1){
score += 1;
}
if(document.forms["DVTCalc"]["input5"].checked == 1){
score += 1;
}
if(document.forms["DVTCalc"]["input6"].checked == 1){
score += 1;
}
if(document.forms["DVTCalc"]["input7"].checked == 1){
score += 1;
}
if(document.forms["DVTCalc"]["input8"].checked == 1){
score += 1;
}
if(document.forms["DVTCalc"]["input9"].checked == 1){
score += 1;
}
 
if(document.forms["DVTCalc"]["input10"].checked == 1){
score -= 2;
}


document.forms["DVTCalc"]["result"].value = score;
document.forms["DVTCalc"]["result"].value = score;

Revision as of 00:49, 31 October 2018