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[" | if(document.forms["IMPROVEDDScore"]["input1"].checked == 1){ | ||
score += 3; | score += 3; | ||
} | } | ||
if(document.forms[" | if(document.forms["IMPROVEDDScore"]["input2"].checked == 1){ | ||
score += 2; | score += 2; | ||
} | } | ||
if(document.forms[" | if(document.forms["IMPROVEDDScore"]["input3"].checked == 1){ | ||
score += 2; | score += 2; | ||
} | } | ||
if(document.forms[" | if(document.forms["IMPROVEDDScore"]["input4"].checked == 1){ | ||
score += 2; | score += 2; | ||
} | } | ||
if(document.forms[" | if(document.forms["IMPROVEDDScore"]["input5"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms[" | if(document.forms["IMPROVEDDScore"]["input6"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
if(document.forms[" | if(document.forms["IMPROVEDDScore"]["input7"].checked == 1){ | ||
score += 1; | score += 1; | ||
} | } | ||
document.forms[" | document.forms["IMPROVEDDScore"]["result"].value = score; | ||
if(score == 0){document.forms[" | if(score == 0){document.forms["IMPROVEDDScore"]["longanswer"].value = "0.4%";} | ||
if(score == 1){document.forms[" | if(score == 1){document.forms["IMPROVEDDScore"]["longanswer"].value = "0.6%";} | ||
if(score == 2){document.forms[" | if(score == 2){document.forms["IMPROVEDDScore"]["longanswer"].value = "0.8%";} | ||
} | } | ||
if(score == 3){document.forms[" | if(score == 3){document.forms["IMPROVEDDScore"]["longanswer"].value = "1.2%";} | ||
} | } | ||
if(score == 4){document.forms[" | if(score == 4){document.forms["IMPROVEDDScore"]["longanswer"].value = "1.6%";} | ||
} | } | ||
if(score >= 5){document.forms[" | if(score >= 5){document.forms["IMPROVEDDScore"]["longanswer"].value = "2.2%";} | ||
} | } | ||
</script> | </script> | ||
<form name=" | <form name="IMPROVEDDScore"> | ||
<table> | <table> |