var vettore = document.getElementById(id_form).elements;
for (var i = 0; i < vettore.length; i++)
{
if (vettore[i].checked)
{
contatore++;
valore_corrente = document.getElementById.elements[i].value;
stringaFileSelezionati+= valore_corrente;
stringaFileSelezionati+= '?';
}
}
if (contatore == 0)
{
alert('Error!!! No file selected!');
return false;
}
else
{
alert(stringaFileSelezionati);
}
The error is in the line:
valore_corrente = document.getElementById.elements[i].value;
how can i get that value?
EDITED: Maybe the error is in the checkboxes creation since I got undefined:
cell1.innerHTML = '<input type="checkbox" name="' + 'checkbox'+" value=" + vettore_nomi_file[i] + '" id="' +i+ '" />'+vettore_nomi_file[i];