J'ai inséré un widget de zoom sur une image, il marche merci Zepatente!
http://gaellepiton.org/site/presse.html
Je voudrais que lorsque l'on clique sur contact, la page contact s'ouvre. J'ai entré l'adresse de la page dans le code, mais sans succès...
des idées?
- Code: Tout sélectionner
<html>
<head>
<script language="JavaScript">
var coeff=2;//Coefficient de reduction
var larg=100;//largeur maxi de l'image
var haut=25;//hauteur maxi de l'image
var coeffinit=coeff;
function changer(nom_de_limage) {
if (document.images[nom_de_limage].width < larg) {
coeff = coeff-0.2;
document.images[nom_de_limage].width = Math.round(larg/coeff);
document.images[nom_de_limage].height = Math.round(haut/coeff);
chang=window.setTimeout('changer("'+document.images[nom_de_limage].name+'");',20);//vitesse de l'effet
}
else {window.clearTimeout(chang);}
}
function initial(nom_de_limage) {
if (document.images[nom_de_limage].width > larg/coeffinit) {
window.clearTimeout(chang);
coeff = coeff+0.2;
document.images[nom_de_limage].width = Math.round(larg/coeff);
document.images[nom_de_limage].height = Math.round(haut/coeff);
initi=window.setTimeout('initial("'+document.images[nom_de_limage].name+'");',20);//vitesse de l'effet
}
else {window.clearTimeout(initi);}
}
//-->
</script>
</head>
<body>
<p align="center">
<a href="http://gaellepiton.org/site/contact.html" onMouseOut="initial('image1')" onMouseOver="changer('image1')" ><img src="http://gaellepiton.org/images/contactx2.png" name="image1" border="0"></a>
</p>
<script language="JavaScript">
<!--
//PLF-http://www.jejavascript.net/
document.image1.width = Math.round(larg/coeff);
document.image1.height = Math.round(haut/coeff);
//-->
</script>
</body>
</html>




