event.clientX en Firefox

jrausell
07 de Septiembre del 2005
Buenas tengo un codigo para sacar un css instant popup, pero solo me funciona en IE, alguien podria orientarme o hacer los cambios para q funcione en cualquier explorador?

codigo:

<script type="text/javascript">
function Show()
{
/* get the mouse left position */
x = event.clientX + document.body.scrollLeft;
/* get the mouse top position */
y = event.clientY + document.body.scrollTop + 35;
/* display the pop-up */
Popup.style.display="block";
/* set the pop-up's left */
Popup.style.left = x;
/* set the pop-up's top */
Popup.style.top = y;
}
/* this function hides the pop-up when
user moves the mouse out of the link */
function Hide()
{
/* hide the pop-up */
Popup.style.display="none";
}
</script>

<body>
<div id="Popup" class="transparent">
<div style="background-color: #003366">
<b>Title goes here</b></div>
<div></b>Description goes here</div>
</div>

<div class="icono" id="B_icono" name="B_icono" onMouseOut="Hide();" onMouseOver="Show();" onMouseMove="Show();"></div>

...


GRACIAS !!

jrausell
07 de Septiembre del 2005
ah! el fallo esq no reconoce el event ni encuentra el Popup