Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/11/2009, 12:37
Avatar de Chupytoloco
Chupytoloco
 
Fecha de Ingreso: julio-2007
Mensajes: 88
Antigüedad: 16 años, 10 meses
Puntos: 1
Ayuda con input value

Buenas, resumo rapido, tengo unos input hiden con id= a_i <- i va del 1 al 9, y tengo otros input con id = ai <- i va del 1 al 9, estoy haciendo una funcion que meta los valores del input hidden en los input normales.

Código HTML:
FUNCIONA:

function dame_tropas_total()
{
      form1.a1.value = document.getElementById("a_1").value;	
}
Código HTML:
NO FUNCIONA:

function dame_tropas_total()
{
	for(i=1;i<=9;i++)
	{
      form1."a"+i.value = document.getElementById("a_"+i).value;
	}
}
A ver si alguien me puede ayudar