Ver Mensaje Individual
  #7 (permalink)  
Antiguo 07/07/2009, 09:10
k2r
 
Fecha de Ingreso: julio-2009
Ubicación: España, madrid
Mensajes: 5
Antigüedad: 14 años, 9 meses
Puntos: 0
Respuesta: Saber cuantos campos existen pero con diferentes "name"

Código:
for(tbl = 0; tbl < nTable.rows.length; tbl ++ )
   {
      var inputsFila = nTable.childNodes[tbl].getElementsByTagName("INPUT");
      if(inputsFila.length == 1){continue;}
      for(j = 0; j < inputsFila.length - 1; j ++ )
      {
         if(inputsFila.item(j).type == "text")
         {
            if(inputsFila.item(j).name == 'XXL')
            {
               var cantidad = new Number(inputsFila.item(j).value);
            }
            else if(inputsFila.item(j).name == 'XL')
            {
               var priceunit = new Number(inputsFila.item(j).value);
            }
            else if(inputsFila.item(j).name == 'L')
            {
               var porcTag = new Number(inputsFila.item(j).value);
            }
         }
      }