Widget:IMPROVEDDScore: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
function calcScore(){ | function calcScore(){ | ||
var score = 0; | var score = 0; | ||
if(document.forms["IMPROVEDDScore"]["input1"].checked == 1){ | if(document.forms["IMPROVEDDScore"]["input1"].checked == 1){score += 3;} | ||
score += 3; | if(document.forms["IMPROVEDDScore"]["input2"].checked == 1){score += 2;} | ||
} | if(document.forms["IMPROVEDDScore"]["input3"].checked == 1){score += 2;} | ||
if(document.forms["IMPROVEDDScore"]["input2"].checked == 1){ | if(document.forms["IMPROVEDDScore"]["input4"].checked == 1){score += 2;} | ||
score += 2; | if(document.forms["IMPROVEDDScore"]["input5"].checked == 1){score += 2;} | ||
} | if(document.forms["IMPROVEDDScore"]["input6"].checked == 1){score += 1;} | ||
if(document.forms["IMPROVEDDScore"]["input3"].checked == 1){ | if(document.forms["IMPROVEDDScore"]["input7"].checked == 1){score += 1;} | ||
score += 2; | if(document.forms["IMPROVEDDScore"]["input8"].checked == 1){score += 1; | ||
} | |||
if(document.forms["IMPROVEDDScore"]["input4"].checked == 1){ | |||
score += 2; | |||
} | |||
if(document.forms["IMPROVEDDScore"]["input5"].checked == 1){ | |||
score += 2; | |||
} | |||
if(document.forms["IMPROVEDDScore"]["input6"].checked == 1){ | |||
score += 1; | |||
} | |||
if(document.forms["IMPROVEDDScore"]["input7"].checked == 1){ | |||
score += 1; | |||
} | |||
if(document.forms["IMPROVEDDScore"]["input8"].checked == 1){ | |||
score += 1; | |||
} | } | ||
document.forms["IMPROVEDDScore"]["result"].value = score; | document.forms["IMPROVEDDScore"]["result"].value = score; |