posto l'intera pagina:
codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
#foto_sfondo {
width: 818px;
height: 578px;
border-top:16px solid #FFF;
clear: left;
background: #CCC url('Modena2.jpg')left no-repeat;
}
</style>
<script type="text/javascript">
var instance;
var speed=25; //This is the speed of scrolling.
var num=0;
var frame=0;
var testi= new Array(); //viene creato l'array
testi [0]="foto 1";
testi [1]="foto 2";
testi [2]="foto 3";
var descrizioni= new Array(); //viene creato l'array
descrizioni [0]="desc desc 1";
descrizioni [1]="desc desc 2";
descrizioni [2]="desc desc 3";
function scrollBGForward()
{
if(frame+1>2){
functionstop();
return;}
num+=8;
if(num> 818 * (frame+1))
{
num= 818*(frame+1);
frame++;
document.getElementById('foto_sfondo').style.backgroundPosition = '-'+num+'px -0px';
description();
functionstop();
}
document.getElementById('foto_sfondo').style.backgroundPosition = '-'+num+'px -0px';
}
function scrollBGBackward()
{
if(frame-1<0){
functionstop();
return;}
num-=8;
if(num< 818 * (frame-1))
{
//num= 818*(frame);
frame--;
//document.getElementById('foto_sfondo').style.backgroundPosition = '-'+num+'px -0px';
description();
functionstop();
}
document.getElementById('foto_sfondo').style.backgroundPosition = '-'+num+'px -0px';
}
function description()
{
document.getElementById('testi').innerHTML =testi[frame];
document.getElementById('desc').innerHTML =descrizioni[frame];
}
function start(speed,bAdv)
{
if(bAdv)
instance = setInterval('scrollBGForward()',speed)
else
instance = setInterval('scrollBGBackward()',speed)
}
function functionstop()
{
clearInterval(instance);
}
</script>
</head>
<body onLoad="description();">
<div id="centrato">
<div id="colonna1">
<ul class="menuNavigazione"><li class="primaVoce">AREA RISERVATA<li class="voceCorrente">CONTATTI<li class="ultimaVoce">JOB OPPORTUNITIES
[/list]
</div>
<div id="colonna2">
</div>
<div id="bordo">
</div>
<div class="menu_home"></div><div class="menu_company"></div><div class="menu_partners"></div><div class="menu_news"></div><div id="menu_dx"></div>
<div id="foto_sfondo" >
<div id="menu_profil"><h1 class="profil_tek"></h1></div>
</div>
<div id="layer1">
<layer name="livello_engineering" left=0 top=0 width=100 height=100 visibility=show bgcolor="#000"></layer>
</div>
<div id="footer">
<ul class="iva">P.IVA 02022360354[/list]
</div>
</div>
[img]leftarrow.png[/img]
[img]rightarrow.png[/img]
</div>
<p id = 'testi'>pp</p>
<p id = 'desc'>aa</p>
</body>
</html>
perchè?
con ie 8 non visualizza l'immagine.
con ff funziona.
c'è del js ma non è fondamentale(penso) il problema secondo me è nel documento html.