Bonjour,
Tout d'abord je suis une débutante alors soyez gentil avec moi

Je souhaiterais faire le même lien cliquable sur les 2 images de mon script qui s' affiche en rollover.

mon script dans ma page html :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Document sans nom</title>
<link href="css/test_image.css" rel="stylesheet" type="text/css" />
</head>
<body>
 
<table  width="200" height="133" border="0" align="center" cellspacing="0" >
  <tr><td>
 
      <script  src="test.js" ></script>
      <script>
	nouveau_id_rollover = monRolloverFlou.length;
	monRolloverFlou[nouveau_id_rollover] = new RolloverFlou(nouveau_id_rollover, 25, 1, 1000, 200, 133);
	//monRolloverFlou[nouveau_id_rollover].ajouteCadre(3, "#000000");
	monRolloverFlou[nouveau_id_rollover].place("images/corinne.jpg",
		"images/couloir.jpg");
      </script>
 
          </td>
  </tr>
</table>
 
 
</body>
</html>

mon fichier test.js est :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
// Flou
// Version : 6.03.11
//
// http://so.fun.free.fr
 
	if (monRolloverFlou == null)
	{
		var monRolloverFlou = new Array();
	}
 
	function RolloverFlou(id_rollover, frequence, vitesse,	delai, largeurMax, hauteurMax)
	{
		this.id_rollover = id_rollover;
 
		// this.rollover = new Array();
 
		// this.calque1 = "";
		// this.calque2 = "";
 
		this.frequence = frequence;
		this.vitesse = vitesse;
		this.delai = delai; // délai entre chaque rotations
 
		this.largeurMax = largeurMax;
		this.hauteurMax = hauteurMax;
 
		// this.indexDiapo = 2;
		this.isMouseOver = false;
		this.enCours = false;
		this.epaisseurCadre = 0;
		this.couleurCadre = "#000000";
 
		this.stats = new Image();
		this.stats.src = "http://so.fun.free.fr/modules/stats/image_bidon.php?script=rollover&version=6.03.11";
	}
 
	function progression()
	{
		if ((this.isMouseOver==false) && document.getElementById('div_rollover_flou1_' + this.id_rollover).style.opacity > 0)
		{// disparition de l'image du dessus
			// pour Firefox (le paramètre existe sous IE mais n'a pas d'influence)
			// ce paramètre sert de base commune pour les deux navigateurs pour tester l'état du calque
			opacite = parseFloat(document.getElementById('div_rollover_flou1_' + this.id_rollover).style.opacity) - parseFloat(this.vitesse / 100);
			if (opacite < 0)
			{
				opacite=0;
			}
			document.getElementById('div_rollover_flou1_' + this.id_rollover).style.opacity = opacite
 
			// pour IE
			if (document.getElementById('div_rollover_flou1_' + this.id_rollover).style.filter)
			{
				texte = document.getElementById('div_rollover_flou1_' + this.id_rollover).style.filter;
				opacite = texte.replace(/alpha\(opacity=([0-9]*)\)/, '$1');
				opacite = parseFloat(opacite) - this.vitesse;
				if (opacite < 0)
				{
					opacite=0;
				}
				//nouveau_texte = texte.replace(/alpha\(opacity=([0-9]*)\)/, 'alpha(opacity=' + opacite + ')');
				nouveau_texte = 'alpha(opacity=' + opacite + ')';
				document.getElementById('div_rollover_flou1_' + this.id_rollover).style.filter = nouveau_texte;
			}
 
			setTimeout("monRolloverFlou[" + this.id_rollover + "].progression()", this.frequence);
		}
		else if ((this.isMouseOver==true) && document.getElementById('div_rollover_flou1_' + this.id_rollover).style.opacity < 0.99)
		{// apparition de l'image du dessus
 
			// pour Firefox (le paramètre existe sous IE mais n'a pas d'influence)
			// ce paramètre sert de base commune pour les deux navigateurs pour tester l'état du calque
			opacite = parseFloat(document.getElementById('div_rollover_flou1_' + this.id_rollover).style.opacity) + parseFloat(this.vitesse / 100);
			if (opacite >= 1)
			{
				opacite=0.99;
			}
			document.getElementById('div_rollover_flou1_' + this.id_rollover).style.opacity = opacite;
 
			// pour IE
			if (document.getElementById('div_rollover_flou1_' + this.id_rollover).style.filter)
			{
				texte = document.getElementById('div_rollover_flou1_' + this.id_rollover).style.filter;
				opacite = texte.replace(/alpha\(opacity=([0-9]*)\)/, '$1');
				opacite = parseFloat(opacite) + this.vitesse;
				if (opacite > 100)
				{
					opacite=100;
				}
				//nouveau_texte = texte.replace(/alpha\(opacity=([0-9]*)\)/, 'alpha(opacity=' + opacite + ')');
				nouveau_texte = 'alpha(opacity=' + opacite + ')';
				document.getElementById('div_rollover_flou1_' + this.id_rollover).style.filter = nouveau_texte;
			}
 
			if (opacite == 0.99)
			{
				this.enCours = false;
				return;
			}
			setTimeout("monRolloverFlou[" + this.id_rollover + "].progression()", this.frequence);
		}
		else
		{
			this.enCours = false;
/*		if (document.getElementById('div_rollover_flou1_' + this.id_rollover).style.opacity < 0) document.getElementById('div_rollover_flou1_' + this.id_rollover).style.opacity = 0;
			if (document.getElementById('div_rollover_flou1_' + this.id_rollover).style.opacity > 1) document.getElementById('div_rollover_flou1_' + this.id_rollover).style.opacity = 1;
 
			if (document.getElementById('div_rollover_flou1_' + this.id_rollover).style.filter)
			{
				if (document.getElementById('div_rollover_flou1_' + this.id_rollover).style.opacity < 0) document.getElementById('div_rollover_flou1_' + this.id_rollover).style.filter = "alpha(0)";
				if (document.getElementById('div_rollover_flou1_' + this.id_rollover).style.opacity > 1) document.getElementById('div_rollover_flou1_' + this.id_rollover).style.filter = "alpha(100)";
			}
*/		}
	}
 
	function changePhoto(souris)
	{
		if(souris && souris=="over")
		{
			this.isMouseOver=true;
		}
		else if(souris && souris=="out")
		{
			this.isMouseOver=false
		}
/*		else if (this.isMouseOver==false) this.isMouseOver=true;
		else this.isMouseOver=false;
*/
		if (this.enCours == false)
		{
			this.enCours = true;
			monRolloverFlou[this.id_rollover].progression();
		}
	}
 
	function place(photo1, photo2)
	{
		document.write('<table align="center" border="' + this.epaisseurCadre + '" bordercolor="' + this.couleurCadre + '" cellpadding="0" cellspacing="0" style="border-style:solid; border-width:' + this.epaisseurCadre + '"><tr><td valign="top">'); // début du tableau pour le cadre
		document.write('<table align="center" border="0" cellpadding="0" cellspacing="0">');
		document.write('<tr height="' + this.hauteurMax + '" align="left">');
		document.write('<td width="' + this.largeurMax + '" valign="top">');
		document.write('<img src="' + photo1 + '" width="' + this.largeurMax + '" height="0" border="0" style="visibility:hidden; border:0; width:' + this.largeurMax + '; height:0"><div></div>'); // je réutilise une des images à la place d'un pixel transparent
		document.write('<div id="div_rollover_flou2_' + this.id_rollover + '" style="position:absolute; display:block; width:' + this.largeurMax + '; height:' + this.hauteurMax + '; overflow:hidden; background-image:url(\'' + photo1 + '\')"><table align="left" border="0" cellpadding="0" cellspacing="0"><tr height="' + this.hauteurMax + '"><td width="' + this.largeurMax + '"></td></tr></table></div>');
		document.write('<div id="div_rollover_flou1_' + this.id_rollover + '" style="position:absolute; display:block; width:' + this.largeurMax + '; height:' + this.hauteurMax + '; overflow:hidden; background-image:url(\'' + photo2 + '\'); opacity:0; filter: alpha(opacity=0)" tmponClick="monRolloverFlou[' + this.id_rollover + '].changePhoto()" onMouseOver="monRolloverFlou[' + this.id_rollover + '].changePhoto(\'over\')" onMouseOut="monRolloverFlou[' + this.id_rollover + '].changePhoto(\'out\')"><table align="left" border="0" cellpadding="0" cellspacing="0"><tr height="' + this.hauteurMax + '"><td width="' + this.largeurMax + '"></td></tr></table></div>');
		document.write('</td>');
		document.write('</tr>');
		document.write('</table>');
		document.write('</td></tr></table>'); // fin du tableau pour le cadre
	}
 
	function ajouteCadre(epaisseur, couleur)
	{
		this.epaisseurCadre = epaisseur;
		this.couleurCadre = couleur;
	}
 
	// liaison des fonctions à l'objet
	RolloverFlou.prototype.place = place;
	RolloverFlou.prototype.changePhoto = changePhoto;
	RolloverFlou.prototype.progression = progression;
	RolloverFlou.prototype.ajouteCadre = ajouteCadre;