Ciao!!
Ho provato anche a cambiare il nome dell'array, posto il codice direttamente... però non riesco a far andare queste due fesserie di codice!!
Boh... ma che strano...
codice:<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Documento senza titolo</title> <link rel="stylesheet" type="text/css" href="stile.css" /> <script type="text/javascript" language="javascript"> <!-- var ima = new array(); ima[1] = 'festa in mensa1.jpg'; ima[0] ='festa in mensa2.jpg'; ima[2] = 'n1538906173_164241_1750.jpg'; function imagerota(val) { alert(ima[val]); document.getElementById('center_photo').src = ima[val]; } //--> </script> </head> <body> <div id="div_container"> <div id="div_testa"> <div id="div_center"> <div id="div_center_photo"> [img]festa in mensa1.jpg[/img] </div> <div id="div_center_text"> <a href="#" onclick = "imagerota(0); return false"> uno due tre </div> </div> </div> </body> </html>