|
|
Bonjour,
Voici le code d'une page et j'aimerais comprendre ce qui ne va pas sous firefox.
Avec IE tout fonctionne et pas un message d'errreur mais sous firefox aucune reaction ?
Merci
<html>
<head>
<!--DEBUT DU CODE ROLLOVER 1-->
<script LANGUAGE="Javascript">
function helpGetOffset(obj, coord) {
var val = obj["offset"+coord] ;
if (coord == "Top") val += obj.offsetHeight;
while ((obj = obj.offsetParent )!=null) {
val += obj["offset"+coord];
if (obj.border && obj.border != 0) val++;
}
return val;
}
function helpDown () {
document.all.helpBox.style.visibility = "hidden";
}
function helpOver (event,texte) {
var ptrObj, ptrLayer;
ptrObj = event.srcElement;
ptrLayer = document.getElementById('helpBox');
if (!ptrObj.onmouseout) ptrObj.onmouseout = helpDown;
var str = '<DIV CLASS="helpBoxDIV">'+texte+'</DIV>';
ptrLayer.innerHTML = str;
ptrLayer.style.top = helpGetOffset (ptrObj,"Top");
ptrLayer.style.left = helpGetOffset (ptrObj,"Left");
ptrLayer.style.visibility = "visible";
}</script>
<style TYPE="text/css">
<!--
#helpBox {
position: absolute;
z-index: 1000;
top: 0px;
left: 0px;
width:250px;
}
DIV.helpBoxDIV {
padding: 2px;
background: white;
border: 1px solid black;
color: black;
font-family: Arial,Helvetica;
font-style: Normal;
font-weight: Normal;
font-size: 10px;
line-height: 14px;
}
-->
</style>
<!--FIN DU CODE ROLLOVER 1-->
</head>
<body>
<br>
<table width=40% border=1 >
<tr>
<td><a onMouseOver="helpOver(event,'Calque affiché')">Passez la souris pour afficher le calque</a></td>
</tr>
</table>
<div ID="helpBox"></div>
</body>
</html>
|