This code keeps returning multiple values according to where the value is on the list. IE: The 5th checkbox returns one value, the 4th returns the same one twice. Can anyone explain to me why this is happening?
function filterCal() {
var filterValues = "";
for (var i=0; i < document.categories.music.length; i++) {
if (document.categories.music*.checked) {
filterValues = filterValues + document.categories.music*.value + "
";
}
document.write(filterValues);
}
}