JavaScript - VALIDACION EN GRILLA, COMO RECORRER GRILLA, HELP

 
Vista:

VALIDACION EN GRILLA, COMO RECORRER GRILLA, HELP

Publicado por MENTA RELOADER (11 intervenciones) el 11/11/2003 23:58:39
TENGO UNA GRILLA Y TENGO EL CAMPO RUT QUIERO VER SI ES
CORRECTO A TRAVES DE UNA FUNCION QUE TENGO, PERO EL
PROBLEMA QUE TENGO ES

contador=1
for (contador;contador<=19;contador++)
{
var largo=form.v_rut.value.length;
alert(largo);
}

EN MI GRILLA TENGO LA CAJa DE TEXTO ES v_rut1, v_rut2, v_rut3 HASTA EL 19, ESTE EJEMPLO CORTO ES PARA SABER COMO A TRAVES DE ESTE FOR EL v_rut VA CAMBIANDO (incrementando hasta 19), LA IDEA QUE TENIA YO
ERA CONCATENARLE EL CONTADOR v_rut & CONTADOR PERO NO ME FUNCIONA SI ALGUIEN SABE ENVIEME COMO PUEDO HACERLO ES URGENTEEEEEEEEE
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:VALIDACION EN GRILLA, COMO RECORRER GRILLA, HEL

Publicado por ShFile (171 intervenciones) el 12/11/2003 00:34:49
Hola..

debera de usar la funcion eval.

eval("var largo=form.v_rut" + contador + ".value.length;");

Suerte
ShFile (Mexico)
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:VALIDACION EN GRILLA, COMO RECORRER GRILLA, HEL

Publicado por German Tamayo (20 intervenciones) el 12/11/2003 01:25:50
Tambien puedes hacerlo asi:
largo=form.elements['v_rut' + contador].value.length;

Mira si te funciona, el caso es usar en vez de el campo directamente, hacerlo a traves de forma.elements['nombrecampo']

Saludos desde Colombia
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar