Foros del Web » Programando para Internet » Javascript »

Por que este script no funciona en internet explorer?

Estas en el tema de Por que este script no funciona en internet explorer? en el foro de Javascript en Foros del Web. Buenas, tengo el siguiente script que me funciona perfectamente en firefox pero en internet explorer no me funciona... que puedo hacer para que me funcione? ...
  #1 (permalink)  
Antiguo 14/02/2009, 06:28
 
Fecha de Ingreso: noviembre-2007
Mensajes: 229
Antigüedad: 16 años, 5 meses
Puntos: 0
Por que este script no funciona en internet explorer?

Buenas, tengo el siguiente script que me funciona perfectamente en firefox pero en internet explorer no me funciona...

que puedo hacer para que me funcione?

gracias

Código HTML:
function set_opacity(div, value) {
    div.style.opacity = value;
    div.style.MozOpacity = value;
    div.style.KhtmlOpacity = value;
    div.style.filter = 'alpha(opacity=' + value*100 + ')';
    div.style.zoom=1;//necesario para Explorer
}
var transicion=function(inicio,fin,segundos){
    var _this=this;
    this.test=0;
    if(_this.intervalo)clearInterval(_this.intervalo);
    if(this.val && Math.abs(fin-_this.val)<0.01)return;
    this.val=!this.val?inicio<1?inicio+.0001:inicio:this.val;
    set_opacity(this, this.val);
    this.pasos=(fin-inicio)/10;
    this.pausa=segundos;
	set_opacity(_this, 1);

    this.intervalo=setInterval(
    function(){
        if(_this.test>99 || Math.abs(fin-_this.val)<0.01){
          clearInterval(_this.intervalo);
        }
        _this.test++;
      // document.getElementById("light").innerHTML=_this.val;
        _this.val=_this.val+_this.pasos;
        if(_this.val<=.01) 
		//set_opacity(_this, 1);
            _this.style.display='none';
		    //set_opacity(_this, 1);
            
        else
		
            _this.style.display='block';
        set_opacity(_this, _this.val);
    },this.pausa);
}


function ver(){

	 var obj=document.getElementById("fade");
    transicion.call(obj,0,0.45,0.0001);

	
	

}
function cerrar(){
    var obj=document.getElementById("fade");
    transicion.call(obj,0.45,0,0.0001);
	


}
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 04:46.