Gracias ocp001a !
No funciono. En cuanto a tus preguntas:
>un elemento en tu html?
Si, el select aparece asi:
Código:
<select Width=60 onChange="calculate(this,document.lengthconv)" name=U2>
Insertando
Código:
var U2=document.getElementById('U2');
el error cambio a:
Código:
U2 is null
if ( U2.options[U2.selectedIndex].value != 0 && U1.selectedIndex > -1 && isnum(V1.value) ) {
Asi luce la funcion insertando la variable que me diste:
Código:
function calculate(obj, inform) {
nfig = parseInt(document.getElementById('precision').value);
nfig=(nfig==0)?6:nfig;
with (inform) {
var U2=document.getElementById('U2');
if ( U2.options[U2.selectedIndex].value != 0 && U1.selectedIndex > -1 && isnum(V1.value) ) {
V2.value=roundfig(eval(V1.value) * eval(U1.options[U1.selectedIndex].value)
/eval(U2.options[U2.selectedIndex].value),nfig);
}
}
}