Widget:IMPROVEDDScore: Difference between revisions

Jump to navigation Jump to search
Tarek Nafee (talk | contribs)
Created page with "<includeonly> <script type="text/javascript"> function calcScore(){ var score = 0; if(document.forms["IMPROVEScore"]["input1"].checked == 1){ score += 3; } if(document.forms[..."
 
Tarek Nafee (talk | contribs)
No edit summary
Line 3: Line 3:
function calcScore(){
function calcScore(){
var score = 0;
var score = 0;
if(document.forms["IMPROVEScore"]["input1"].checked == 1){
if(document.forms["IMPROVEDDScore"]["input1"].checked == 1){
score += 3;
score += 3;
}
}


if(document.forms["IMPROVEScore"]["input2"].checked == 1){
if(document.forms["IMPROVEDDScore"]["input2"].checked == 1){
score += 2;
score += 2;
}
}
if(document.forms["IMPROVEScore"]["input3"].checked == 1){
if(document.forms["IMPROVEDDScore"]["input3"].checked == 1){
score += 2;
score += 2;
}
}
if(document.forms["IMPROVEScore"]["input4"].checked == 1){
if(document.forms["IMPROVEDDScore"]["input4"].checked == 1){
score += 2;
score += 2;
}
}
if(document.forms["IMPROVEScore"]["input5"].checked == 1){
if(document.forms["IMPROVEDDScore"]["input5"].checked == 1){
score += 1;
score += 1;
}
}
if(document.forms["IMPROVEScore"]["input6"].checked == 1){
if(document.forms["IMPROVEDDScore"]["input6"].checked == 1){
score += 1;
score += 1;
}
}
if(document.forms["IMPROVEScore"]["input7"].checked == 1){
if(document.forms["IMPROVEDDScore"]["input7"].checked == 1){
score += 1;
score += 1;
}
}
document.forms["IMPROVEScore"]["result"].value = score;
document.forms["IMPROVEDDScore"]["result"].value = score;
if(score == 0){document.forms["IMPROVEScore"]["longanswer"].value = "0.4%";}
if(score == 0){document.forms["IMPROVEDDScore"]["longanswer"].value = "0.4%";}
if(score == 1){document.forms["IMPROVEScore"]["longanswer"].value = "0.6%";}
if(score == 1){document.forms["IMPROVEDDScore"]["longanswer"].value = "0.6%";}
if(score == 2){document.forms["IMPROVEScore"]["longanswer"].value = "0.8%";}
if(score == 2){document.forms["IMPROVEDDScore"]["longanswer"].value = "0.8%";}
}
}
if(score == 3){document.forms["IMPROVEScore"]["longanswer"].value = "1.2%";}
if(score == 3){document.forms["IMPROVEDDScore"]["longanswer"].value = "1.2%";}
}
}
if(score == 4){document.forms["IMPROVEScore"]["longanswer"].value = "1.6%";}
if(score == 4){document.forms["IMPROVEDDScore"]["longanswer"].value = "1.6%";}
}
}
if(score >= 5){document.forms["IMPROVEScore"]["longanswer"].value = "2.2%";}
if(score >= 5){document.forms["IMPROVEDDScore"]["longanswer"].value = "2.2%";}
}
}


</script>
</script>


<form name="IMPROVEScore">
<form name="IMPROVEDDScore">


<table>
<table>

Revision as of 15:08, 13 October 2017