Buenas tardes,
Soy nuevo en el tema de programación de webs y estoy intentando entender códigos.
Ayer descargue el siguiente codigo en internet y en IE funciona perfectamente pero me da problemas en Mozilla.
Podríais ayudarme a entender porque.
Gracias y disculpar por mi ignorancia.
<body onLoad="showimage()">
<script language="javaScript">
newimage0 = new Image();
newimage0.src = "house0.jpg";
newimage1 = new Image();
newimage1.src = "house1.jpg";
newimage2 = new Image();
newimage2.src = "house2.jpg";
newimage3 = new Image();
newimage3.src = "house4.jpg";
newimage4 = new Image();
newimage4.src = "house0.jpg";
var i_strngth=1
var i_image=0
var imageurl = new Array()
imageurl[0] ="house0.jpg"
imageurl[1] ="house1.jpg"
imageurl[2] ="house2.jpg"
imageurl[3] ="house4.jpg"
imageurl[4] ="house0.jpg"
function showimage() {
if (i_strngth <=110) {
testimage.innerHTML="<img style='filter:alpha(opacity="+i_strngth+")' src="+imageurl[i_image]+" border=0>";i_strngth=i_strngth+10
var timer=setTimeout("showimage()",200)
}else {
clearTimeout(timer)
var timer=setTimeout("hideimage()",2500)
}
if(document.layers) {
clearTimeout(timer)
document.testimage.document.write("<img src="+imageurl[i_image]+" border=0 >")
document.close()
i_image++
if (i_image >= imageurl.length)
{i_image=0}
var timer=setTimeout("showimage()",10000)
}
}
function hideimage() {
if (i_strngth >=-10) {
testimage.innerHTML="<img style='filter:alpha(opacity="+i_strngth+")'src="+i mageurl[i_image]+" border=0>";
i_strngth=i_strngth-10
var timer=setTimeout("hideimage()",80)
}else {
clearTimeout(timer)
i_image++
if (i_image >= imageurl.length) {i_image=0}
i_strngth=1
var timer=setTimeout("showimage()",400)
}
}
//-->
</script>
<div id="testimage" style="position: absolute; visibility: visible; top: 90; left: 290; width: 290; height: 19">
</div>
</body>
</html>