mgyavas
11-09-2003, 03:03 PM
Hi, I am trying to make a self grading test for a course project. i have prepared the js code with my little knowledge but i cant get it working. can someone look at my code?
function checkRadios() {
var q1 = document.eva.q1;
var q2 = document.eva.q2;
var q3 = document.eva.q3;
var q4 = document.eva.q4;
var q5 = document.eva.q5;
var q6 = document.eva.q6;
var total = q1+q2+q3+q4+q5+q6;
alert(total);
if( total>=25){ alert("Congratulations you learned all about matrix.");}
else if( 16<=total<=24 ){ alert("You should try to focus on some specific points of the matrix structure.".total);}
else if( 7<=total<=15){ alert("You do not understand what the matrix structure is, take a look at it once more.");}
else if(0<=total<=6){ alert("Take a look at everything once more!!!");}
}
i have 6 radiogroups and they are valued from 1 to 5.
Why does my code not working?:( :confused:
function checkRadios() {
var q1 = document.eva.q1;
var q2 = document.eva.q2;
var q3 = document.eva.q3;
var q4 = document.eva.q4;
var q5 = document.eva.q5;
var q6 = document.eva.q6;
var total = q1+q2+q3+q4+q5+q6;
alert(total);
if( total>=25){ alert("Congratulations you learned all about matrix.");}
else if( 16<=total<=24 ){ alert("You should try to focus on some specific points of the matrix structure.".total);}
else if( 7<=total<=15){ alert("You do not understand what the matrix structure is, take a look at it once more.");}
else if(0<=total<=6){ alert("Take a look at everything once more!!!");}
}
i have 6 radiogroups and they are valued from 1 to 5.
Why does my code not working?:( :confused: