What I want to achieve is populating many form fields with the same value. I can do it for an element that has an id:
function selectDateAndArendeSearch(year, month, day, field, number, numberfield) {
var m = parseInt(month)+1;
if(m<10)
month="0"+m;
else
month=m;
if(day.length==1)
day="0"+day;
document.actionForm.all(field).value = year+"-"+month+"-"+day;
document.actionForm.all(numberfield).value = number;
document.getElementById('popupF').style.display = 'none';
}
But how do I do it for many elements i.e. a class?