Hello i want to create a array in java script withing 2 for loops
var i;
var a;
var total = document.getElementsByName('qm[7]')
var creativity = document.getElementsByName('qm[0]');
var design = document.getElementsByName('qm[1]');
var text = document.getElementsByName('qm[3]');
var motivation = document.getElementsByName('qm[5]');
var depth = document.getElementsByName('qm[6]');
var usefulness = document.getElementsByName('qm[8]');
var research = document.getElementsByName('qm[9]');
ratingArray = new Array(total,creativity,design,text,motivation,depth,usefulness,research);
for(i=0; i < ratingArray.length;i++)
{
for(a=0; a < ratingArray[i].length;a++)
{
if(ratingArray[i][a].checked == true)
{
rateArray = new Array(ratingArray[i][a].value);
}
}
}
and if i return rateArray it just gives the first element any idea?