El detalle es que me da un mensaje de NaN, supongo que son los valores con punto flotante :S
Traté con valores enteros y funciona, pero haciendo un pequeño sin importancia...
Así ha quedado el código...
Código:
function cambiodias()
{
var a=document.form1.nro_dias.value;
var b=document.form1.dias1.value;
var c=document.form1.UT.value;
var d=document.form1.ctte.value;
var e=document.form1.nro_dias.value;
document.form1.dias1.value=a;
var j=eval(b*c*d);
document.form1.precio_dias.value=j;
document.form1.dias2.value=e;
var f=document.form1.dias2.value;
var g=document.form1.UT2.value;
var h=document.form1.ctte2.value;
var i=eval(f*g*h);
document.form1.precio_pasaje.value=i;
document.form1.precio_total.value=eval(j+i);
}
Código HTML:
<form id="solicitud" action="ValidarSolicitudOrdenPago.php" method="post" name="formulario_solicutud_pago" target="_top">
<table>
<tr>
<td>Numero de dias<input type="text" id="nro_dias" name="nro_dias" size="10" value="1" onchange = "javascript:cambio_dias();"></td>
<td><input name="UT" type="text" id="UT" size="7" value="55" disabled="disabled"/></td>
<td>*<input name="ctte" type="text" id="ctte" size="7" value="6" disabled="disabled"/></td>
<td>*<input name="dias" type="text" id="dias" size="7" disabled="disabled"/></td>
<td>=
<input type="text" id="precio_dias" name="precio_dias" size="10" disabled="disabled"></td>
</tr>
<tr>
<td></td>
<td><input name="ctte2" type="text" id="ctte2" size="7" value="1" disabled="disabled"/>
*</td>
<td><input name="UT2" type="text" id="UT2" size="7" value="55" disabled="disabled"/></td>
<td>*<input name="dias2" type="text" id="dias2" size="7" disabled="disabled"/></td>
<td>=
<input type="text" id="precio_pasaje" name="precio_pasaje" size="10" disabled="disabled"></td>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td>Total<input type="text" id="precio_total" name="precio_total" size="10" disabled="disabled"></td>
</tr>
</tr>
</table>
</form>