Hola qué tal
te sugiero que para hacerlo accedas a los elementes mediante un id único que esté asociado con el checkbox.
Prueba con algo así
Código:
<%
contador = 0
//aquí comienza el bucle
%>
<TR>
<TD width=8% colspan="1" rowspan="2" align="center" valign="middle" class="lineaDetalle">
<input type="checkbox" name="checkItem" id="checkItem_<%=contador%>" value="checkbox" onClick="habilitarLinea(<%=contador%>)">
</TD>
<TD width=15% colspan="1" class="lineaDetalle"><%=pr.getRubro()%></TD>
<TD width=26% colspan="1" class="lineaDetalle"><%=pr.getNombre()%></TD>
<TD width=23% colspan="1" class="lineaDetalle"><%=pr.getDescripcion()%></TD>
<TD colspan="2" class="lineaDetalle">
<%=cant%>
<input type="hidden" name="cantidad" value="<%=cant%>">
</TD>
</TR>
<TR>
<TD width=15% colspan="1" valign="middle" class="lineaDetalle">Moneda:
<select name="moneda[]" size=1 class="SELECT1" id="moneda_<%=contador%>>
<option value="Euro">Euro</option>
<option value="Dolar">Dolar</option>
<option value="Peso">Peso</option>
</select>
<input type="hidden" name="moneda">
</TD>
<TD width=26% colspan="1" class="lineaDetalle" align="right">Cotizacion:
<input name="cotizacion[]" id="cotizacion_<%=contador%>" type="text" class="INPUT1" size="10" maxlength="10" onKeypress="validarSoloNros()" >
<input name="cotizacion[]" type="hidden">
</TD>
<TD width=23% colspan="1" class="lineaDetalle" align="right">Precio:
<input name="precio[]" id="precio_<%=contador%>" type="text" class="INPUT1" value="0" size="10" maxlength="10" onKeypress="validarSoloNros()" >
<input name="precio" type="hidden">
</TD>
<TD colspan="2" class="lineaDetalle" align="right">SubTotal:
<input name="subtotal[]" type="text" class="INPUT1" value="0" size="10" maxlength="10">
<input name="subtotal" type="hidden">
</TD>
</TR>
<% contador++ %>
y tu función js que quede así
Código:
function habilitarLinea(v) {
if (document.getElementById('checkItem_ '+ v).checked ) {
document.getElementById('moneda_' + v).disabled = false;
document.getElementById('cotizacion_' + v).disabled = false;
document.getElementById('precio_' + v).disabled = false;
} else {
document.getElementById('moneda_' + v).disabled = true;
document.getElementById('cotizacion_' + v).disabled = true;
document.getElementById('precio_' + v).disabled = true;
}
}
No lo he probado pero debería funcionar