I have a form with a few checkboxes
[CODE]
<input type=’checkbox’ name=’idName[1]’ checked><b> Data Cabinet – 7ft – 0113</td></tr>
<input type=’checkbox’ name=’idName[2]’ checked><b> Data Cabinet – 5ft -0463</td></tr>
<input type=’checkbox’ name=’idName[3]’ ><b> Data Cabinet – 5ft – 0463</td></tr>
I have a string with numbers of the name.
For instance the string “1,3”
Where I am trying to get the value of idName[1] and idName[3]
[CODE]
newTempArray = s1.split(“,”);
for(var i=0; i<newTempArray.length; i++){
k = newTempArray[i] ;
m = ‘idName[‘ + k + ‘]’;
tempElement = document.getElementsByTagName(m);
document.write(tempElement);
document.write(tempElement.getAttribute(‘checkbox’) );
}
However I am getting an error on getting the elements value.
How can I get the elements checked status?
thanks