Hola tengo el siguiente codigo:
Código Javascript
:
Ver originalfunction padNmb(nStr, nLen){
var sRes = String(nStr);
var sCeros = "0000000000";
return sCeros.substr(0, nLen - sRes.length) + sRes;
}
function calcHr(){
var hr = parseInt(document.getElementById("hr_termino").value) - parseInt(document.getElementById("hr_inicio").value);
var min = parseInt(document.getElementById("min_termino").value) - parseInt(document.getElementById("min_inicio").value);
if(min<0) {
min = min + 60;
hr = hr -1;
document.getElementById("time").value = padNmb(hr,2) + ":" + padNmb(min,2);
document.getElementById("ufValor").value = "$ " + Math.round((hr + min/60)* parseInt(document.getElementById("ocuUF").value) ); document.getElementById("chkRemoto").disabled= false;
document.getElementById("tecnicos").disabled= false;
}
else{
document.getElementById("time").value = padNmb(hr,2) + ":" + padNmb(min,2);
document.getElementById("ufValor").value = "$ " + Math.round((hr + min/60)* parseInt(document.getElementById("ocuUF").value) ); document.getElementById("chkRemoto").disabled= false;
document.getElementById("tecnicos").disabled= false;
}
}
function calc_tecnicos(cant) {
calcHr();
var hora = document.formVisita.time.value;
//var cant = document.formVisita.tecnicos.value;
var sep = hora.indexOf(":");
var hr = hora.substr(0,sep)* 3600;
var min = hora.substr(sep+1)* 60;
var secs = (hr+min) * cant;
hr = Math.floor(secs / 3600);
min = Math.floor((secs - (hr*3600))/60);
document.formVisita.time.value = (padNmb(hr,2) + ":" + padNmb(min,2));
}
El problema es la funcion calc_tecnicos, porque en firefox me funciona perfecto, pero en IE no, a que se debe????.
Saludos