salve a tutti,

ho questo codice:

codice:
for(var i=0;i<arrayPunti.length;i++){
 ...
 var idpunto = "punto" + i;
 document.getElementById(idpunto).onclick = function(){
  document.getElementById('formpuntiinteresse').action = "'" + arrayPunti[i].url + "'";
  document.getElementById('formpuntiinteresse').submit();
 }
}
come mai l'interprete mi dice che arrayPunti[i] non è definito? come lo rendo visibile, nell'ambito di function()?

grazie. :)

saluti