Bonjour,

Voial mon code :

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
function position(e,nom_div)
	{
		// coordonnées du curseur
 
				var PosSourisHoriz = 0
				var PosSourisVerti = 0
 
			x = (navigator.appName.substring(0,3) == "Net") ? e.pageX : event.x+document.body.scrollLeft;
			y = (navigator.appName.substring(0,3) == "Net") ? e.pageY : event.y+document.body.scrollTop;
 
				PosSourisHoriz = x;
				PosSourisVerti = y;
 
 
 
		// Positionnement du panneau
 
			if (document.getElementById) 
				{
				cnt = document.getElementById(nom_div);
				} 
			else if (document.all) 
				{
				cnt = document.all[nom_div];
				}
 
			cnt.style.left = PosSourisHoriz - 151;      // Position horizontale
			cnt.style.top = PosSourisVerti - 0;      // position verticale	
	}
Celui-ci me sert a ouvrir un div au niveau de mon curseur de souris. Cela fonctionne avec IE, mais pas avec Firefox. Voyez vous pourquoi?