Newsgroup: it.comp.lang.javascript
Titolo: modifica script ...

Salve ragazzi ho bisogno ancora di voi .
Per rendere questo script visibile anche con netscape ,che tipo di modifica
devo effettuare ?
grazie a tutti ancora per la vostra pazienza e disponibilità.
glassman
<html>
<head>
<script language="javascript">
function showchar()
{
if
(window.document.imgselect.img.options[0].selected){document.picinfo.src="ve
trata artistica.jpg";
document.imgselect.textinfo.value="Questa vetrata è costituita ";}
if
(window.document.imgselect.img.options[1].selected){document.picinfo.src="tu
cano2.jpg";
 document.imgselect.textinfo.value="     You are looking at Image 2";}
if
(window.document.imgselect.img.options[2].selected){document.picinfo.src="po
rta9.jpg";
 document.imgselect.textinfo.value="     You are looking at Image 3";}
if
(window.document.imgselect.img.options[3].selected){document.picinfo.src="po
rta3.jpg";
 document.imgselect.textinfo.value="     You are looking at Image 4";}
if
(window.document.imgselect.img.options[4].selected){document.picinfo.src="po
rta4.jpg";
 document.imgselect.textinfo.value="     You are looking at Image 5";}
if
(window.document.imgselect.img.options[5].selected){document.picinfo.src="po
rta5.jpg";
 document.imgselect.textinfo.value="     You are looking at Image 6";}
if
(window.document.imgselect.img.options[6].selected){document.picinfo.src="po
rta6.jpg";
 document.imgselect.textinfo.value="     You are looking at Image7";}
if
(window.document.imgselect.img.options[7].selected){document.picinfo.src="po
rta7.jpg";
 document.imgselect.textinfo.value="     You are looking at Image 8";}
if
(window.document.imgselect.img.options[8].selected){document.picinfo.src="po
rta8.jpg";
 document.imgselect.textinfo.value="     You are looking at Image 9";}
if
(window.document.imgselect.img.options[9].selected){document.picinfo.src="po
rtareale.jpg";
 document.imgselect.textinfo.value="     You are looking at Image 10";}
if
(window.document.imgselect.img.options[10].selected){document.picinfo.src="i
ltucano.jpg";
 document.imgselect.textinfo.value="     You are looking at Image 11";}
if
(window.document.imgselect.img.options[11].selected){document.picinfo.src="g
esu.jpg";
 document.imgselect.textinfo.value="     You are looking at Image 12";}
}
// -->
</script>
<form name="imgselect">
  <center><p><select name="img" size="1">
    <option>Image 1</option>
    <option>Image 2</option>
    <option>Image 3</option>
    <option>Image 4</option>
    <option>Image 5</option>
    <option>Image 6</option>
    <option>Image 7</option>
    <option>Image 8</option>
    <option>Image 9</option>
    <option>Image 10</option>
    <option>Image 11</option>
    <option>Image 12</option>
  </select> <input type="button" value="Display"
  onClick="if (navigator.appName=='Microsoft Internet
Explorer'){showchar();}
else {alert('Scusa, questo è visibile solo con : Microsoft Internet
Explorer, ma ti porto dove è possibile vedere, grazie');
location.href='vetrateartistiche.html'}
</body>
</html>
--
GLASSMAN

Io ti posto uno script che ho usato io in precedenza, adattata la caso tuo:
var percorsoImg = new Array(document.imgselect.img.length)
ver descrizione = new Array(document.imgselect.img.length)
percorsoImg[0] = "vetrata artistica.jpg"
percorsoImg[1] = "tucano2.jpg"
percorsoImg[2] = "porta9.jpg"
percorsoImg[3] = "porta3.jpg"
...
descrizione[0] = "Questa vetrata è costituita "
descrizione[1] = "     You are looking at Image 2"
...
function showchar()
{
    document.picinfo.src = percorsoImg[document.imgselect.img.selectedIndex]
    document.imgselect.textinfo.value =
descrizione[document.imgselect.img.selectedIndex]
}
Funziona perfettamente con NS (anche la versione che postato tu lo dovrebbe,
magari prova a togliere window davanti a document)
CIAO :)



 wrote in message
7kona5$gas$1...@fe1.cs.interbusiness.it...
