javascript aiuto

  • Creatore Discussione Creatore Discussione 02perla
  • Data di inizio Data di inizio

02perla

Nuovo Utente
16 Mar 2005
13
0
0
--------------------------------------------------------------------------------

Ciao,
ho bisogno di un piccolo aiutino, non sono molto brava in javascript (prime armi insomma).
Ho prilavato uno script di un visualizzatore di immagini da internet che però non funziona sul mio sito quindi vorrei sapere perchè.

Poi non ho capito dove devo inserire le immagini sorgenti e come?


Dovrebbe funzionare cos'ì, quando passo sopra con il muose alle scritte dovrebbe cambiare l'immagine nel riquadro a dx.
il link è : www.ballillaricordi.it/foto-balilla-auto-per-matr.html

Vi posto anche il codice:
Codice:
</style>
<script>
function changeimage(towhat,url){
if (document.images){
document.images.targetimage.src=towhat.src
gotolink=url
}
}
function warp(){
window.location=gotolink
}
</script>
<script language="JavaScript1.1">
var myimages=new Array()
var gotolink="#"
function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}
preloadimages("immage/01.gif","immage/02.gif","immage/03.gif")
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (Le foto sorgente nuovo.psd) -->
<table width="798" height="328" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
 <tr>
  <td colspan="5" width="798" height="72"><table width="798" height="68" border="0">
          <tr>
            <td><div align="center"></div></td>
          </tr>
        </table>
   </td>
 </tr>
 <tr>
  <td rowspan="5" width="445" height="256" ><table width="450" border="0">
         
         
          
          <tr>
            <td><a href="#" onMouseover="changeimage(myimages[0],this.href)">- Le nostre auto noleggio per matrimoni</a></td>
          </tr>
          <tr>
            <td><a href="#" onMouseover="changeimage(myimages[1],this.href)">- Fiat Balilla noleggio per matrimoni</a> </td>
          </tr>
          <tr>
            <td><a href="#" onMouseover="changeimage(myimages[2],this.href)">- Fiat Ballilla noleggio per matrimoni</a> </td>
          </tr>
         
          
         
        </table>
   </td>
  <td colspan="3" width="321" height="15">
   <p> </p>
   <p> </p>
   <p> </p>
   <p> </p>
   <p> </p></td>
  <td rowspan="4" width="32" height="226">
   </td>
 </tr>
 <tr>
  <td colspan="3">
   <img src="images/foto-balilla-auto-per-ma-05.gif" width="321" height="7" alt=""></td>
 </tr>
 <tr>
  <td rowspan="2">
   <img src="images/foto-balilla-auto-per-ma-06.gif" width="9" height="204" alt=""></td>
  <td width="303" height="197">
   
   <a href="java-script:warp()"><img src="images/foto-balilla-auto-per-ma-07.gif" name="targetimage" border=0></a></td>
  <td rowspan="2">
   <img src="images/foto-balilla-auto-per-ma-08.gif" width="9" height="204" alt=""></td>
 </tr>
 <tr>
  <td>
   <img src="images/foto-balilla-auto-per-ma-09.gif" width="303" height="7" alt=""></td>
 </tr>
 <tr>
  <td colspan="4" width="353" height="30"></td>
   
 </tr>
</table>
<!-- End ImageReady Slices -->
</body>
</html>
 
Ho corretto così il codica ma non funziona ancora.

Codice:
<script>

function changeimage(towhat,url){
if (document.images){
document.images.targetimage.src=towhat.src
gotolink=url
}
}
function warp(){
window.location=gotolink
}

</script>
<script language="JavaScript1.1">
var myimages=new Array()
var gotolink="#"

function preloadimages(){
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}

preloadimages("immages/01.JPG","immages/02.JPG","immages/03.JPG")
</script>
 

Discussioni simili