Con mozilla invece funziona benissimo, e il firebug di mozilla non rileva nessun errore.
Codice pagina:
codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>I Font</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" media="print" href=
"style_stampa.css" />
<meta http-equiv="Content-Type" content=
"text/html; charset=us-ascii" />
<script type="text/javascript" src="script/cercaPagina.js">
</script>
<script type="text/javascript" src="script/stampa.js"></script>
<script type="text/javascript" src="script/galleria.js"></script>
<script type="text/javascript">
<!--
function in_giorni (s) {
return Math.floor(s/(1000 * 60 * 60 * 24))
}
//-->
</script>
</head>
<body>
... menù
... contenuti ...
<div>
[img]immagini/01.png[/img]
<form id="form" method="post" action="">
<input type="button" name="precedente" value="precedente" onclick="immaginePrecedente();" />
<input type="button" name="prossima" value="prossima" onclick="immagineSuccessiva();" />
</p>
</form>
</div>
... altri contenuti
</body>
</html>
Codice javascript:
codice:
var percorso_immagini = "immagini/";
var elenco_immagini = new Array("01.png","02.png","serif-sans-serif.jpg","03.jpg","04.png","05.png","06.png","07.png","08.png","09.png","10.png");
var immagine_corrente = 0;
function immagineSuccessiva() {
immagine_corrente++;
if (immagine_corrente > elenco_immagini.length-1)
{
immagine_corrente=0;
}
document.immagine.src = percorso_immagini + elenco_immagini[immagine_corrente];
}
function immaginePrecedente() {
immagine_corrente--;
if (immagine_corrente < 0)
{
immagine_corrente=elenco_immagini.length-1;
}
document.immagine.src = percorso_immagini + elenco_immagini[immagine_corrente];
}
Grazie in anticipo se ci capite qualcosa!!