cdv
Membre récent

Hors-Ligne
Messages: 1

Je suis un lama!
|
Bonjour, l'exécution du script zoom image ne fonctionne pas avec mes 6 images alors qu'il fonctionnait bien avec une seule. Des idées ? Merci ! <html>
<head> <meta http-equiv="Content-Language" content="fr"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<style type="text/css"> texte { font-family: "Comic Sans MS"; color:#8C3C29; } titre { font-weight: bold; color:red; } </style>
<title>Agenda</title> <script language="JavaScript"> <!-- function FP_preloadImgs() {//v1.0 var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array(); for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; } } // --> </script>
<script language="JavaScript"> <!-- //PLF-http://www.jejavascript.net/ var coeff=5;//Coefficient de reduction var larg=500;//largeur maxi de l'image var haut=500;//hauteur maxi de l'image function changer(sel) { switch(sel){ case 1 : //image 1 if (document.image1.width < larg) { coeff = coeff-0.2; document.image1.width = Math.round(larg/coeff); document.image1.height = Math.round(haut/coeff); chang=window.setTimeout('changer(1);',60);//vitesse de l'effet } break; case 2 : //image 2 if (document.image2.width < larg) { coeff = coeff-0.2; document.image2.width = Math.round(larg/coeff); document.image2.height = Math.round(haut/coeff); chang=window.setTimeout('changer(2);',60);//vitesse de l'effet } break; case 3 : //image 3 if (document.image3.width < larg) { coeff = coeff-0.2; document.image3.width = Math.round(larg/coeff); document.image3.height = Math.round(haut/coeff); chang=window.setTimeout('changer(3);',60);//vitesse de l'effet } break; case 4 : //image 4 if (document.image3.width < larg) { coeff = coeff-0.2; document.image4.width = Math.round(larg/coeff); document.image4.height = Math.round(haut/coeff); chang=window.setTimeout('changer(3);',60);//vitesse de l'effet } break; case 5 : //image 5 if (document.image3.width < larg) { coeff = coeff-0.2; document.image5.width = Math.round(larg/coeff); document.image5.height = Math.round(haut/coeff); chang=window.setTimeout('changer(3);',60);//vitesse de l'effet } break; case 6 : //image 6 if (document.image3.width < larg) { coeff = coeff-0.2; document.image6.width = Math.round(larg/coeff); document.image6.height = Math.round(haut/coeff); chang=window.setTimeout('changer(3);',60);//vitesse de l'effet }
if (document.image2.width >= larg) window.clearTimeout(chang); } function initial(sel) { switch(sel){ case 1 : //image 1 if (document.image1.width > larg/4) { window.clearTimeout(chang); coeff = coeff+0.2; document.image1.width = Math.round(larg/coeff); document.image1.height = Math.round(haut/coeff); initi=window.setTimeout('initial(1);',60);//vitesse de l'effet } break; case 2 : //image 2 if (document.image2.width > larg/4) { window.clearTimeout(chang); coeff = coeff+0.2; document.image2.width = Math.round(larg/coeff); document.image2.height = Math.round(haut/coeff); initi=window.setTimeout('initial(2);',60);//vitesse de l'effet } break; case 3 : //image 3 if (document.image3.width > larg/4) { window.clearTimeout(chang); coeff = coeff+0.2; document.image3.width = Math.round(larg/coeff); document.image3.height = Math.round(haut/coeff); initi=window.setTimeout('initial(3);',60);//vitesse de l'effet } break; case 4 : //image 4 if (document.image4.width > larg/4) { window.clearTimeout(chang); coeff = coeff+0.2; document.image4.width = Math.round(larg/coeff); document.image4.height = Math.round(haut/coeff); initi=window.setTimeout('initial(4);',60);//vitesse de l'effet } break; case 5 : //image 5 if (document.image5.width > larg/4) { window.clearTimeout(chang); coeff = coeff+0.2; document.image5.width = Math.round(larg/coeff); document.image5.height = Math.round(haut/coeff); initi=window.setTimeout('initial(5);',60);//vitesse de l'effet } break; case 6 : //image 6 if (document.image6.width > larg/4) { window.clearTimeout(chang); coeff = coeff+0.2; document.image6.width = Math.round(larg/coeff); document.image6.height = Math.round(haut/coeff); initi=window.setTimeout('initial(6);',60);//vitesse de l'effet } if (document.image1.width < larg/4) window.clearTimeout(initi); } //--> </script>
</head>
<body background="fond%20clair.jpg" onload="FP_preloadImgs(/*url*/'button45.jpg')">
<p class="MsoNormal" style="text-align:justify"> <font color="#FFFFFF"> <span style="font-family: Comic Sans MS; background-color: #8C3C29" lang="FR-BE"> <font size="4"> <b>Agenda </b></font></span></font></p> <p class="MsoNormal" style="text-align:justify"> </p> <p class="MsoNormal" style="text-align:center"> <img border="0" src="invit%201er%20page.jpg" width="440" height="446"><img border="0" src="fichiers/courte%20echelle/invit%20derniere%20page.jpg" width="448" height="447"></p> <p align="center">
<font color="#8C3C29" size="2"> <span style="font-family: Comic Sans MS; font-style: italic"> (découvrez le programme en survolant les images ci-dessous)<br> <br> <a href="#" onMouseOut="initial(1)" onMouseOver="changer(1)" > <img src="fichiers/courte%20echelle/janvier.jpg" name="image1" border="0" width="230" height="239"></a> <script language="JavaScript"> <!-- //PLF-http://www.jejavascript.net/ document.image1.width = Math.round(larg/coeff); document.image1.height = Math.round(haut/coeff); //--> </script>
<a href="#" onMouseOut="initial(2)" onMouseOver="changer(2)" > <img src="fichiers/courte%20echelle/fevrier.jpg" name="image2" border="0" width="233" height="239"></a> <script language="JavaScript"> <!-- //PLF-http://www.jejavascript.net/ document.image2.width = Math.round(larg/coeff); document.image2.height = Math.round(haut/coeff); //--> </script>
</span></font> <p align="center"> <a href="#" onMouseOut="initial(3)" onMouseOver="changer(3)" > <img src="fichiers/courte%20echelle/mars.jpg" name="image1" border="0" width="235" height="239"></a> <script language="JavaScript"> <!-- //PLF-http://www.jejavascript.net/ document.image3.width = Math.round(larg/coeff); document.image3.height = Math.round(haut/coeff); //--> </script>
<a href="#" onMouseOut="initial(4)" onMouseOver="changer(4)" > <img src="fichiers/courte%20echelle/avril.jpg" name="image4" border="0" width="240" height="239"></a> <script language="JavaScript"> <!-- //PLF-http://www.jejavascript.net/ document.image4.width = Math.round(larg/coeff); document.image4.height = Math.round(haut/coeff); //--> </script>
<p align="center"> <a href="#" onMouseOut="initial(5)" onMouseOver="changer(5)" > <img src="fichiers/courte%20echelle/mai.jpg" name="image5" border="0" width="236" height="235"></a> <script language="JavaScript"> <!-- //PLF-http://www.jejavascript.net/ document.image5.width = Math.round(larg/coeff); document.image5.height = Math.round(haut/coeff); //--> </script> <a href="#" onMouseOut="initial(6)" onMouseOver="changer(6)" > <img src="fichiers/courte%20echelle/juin.jpg" name="image6" border="0" width="240" height="239"></a> <script language="JavaScript"> <!-- //PLF-http://www.jejavascript.net/ document.image6.width = Math.round(larg/coeff); document.image6.height = Math.round(haut/coeff); //--> </script> |