У меня есть подсказка, которая при наведении курсора мыши открывается в верхнем левом углу
страницы безотносительно к «наведению мыши».
В случае IE8 это работает нормально и открывается чуть выше места, где находится мышь
помещен, но в Firefox он не может рассчитать / интерпретировать значения.
вот фрагмент кода для всплывающей подсказки
function DoFlyOver()
{
if( ToClear != -1 ) window.clearTimeout( ToClear );
var thisForm = eval("document." + formName);
if (FlyOverArea == null) FlyOverArea = document.getElementById("FlyOverArea");
if (FlyOverArea.firstChild!==null)
FlyOverArea.removeChild(FlyOverArea.firstChild); // remove all existing content
FlyOverArea.appendChild(document.createTextNode(FoText));
FoLeft = $displayOptions.getFlyoverLeftOfCursor();
FoTop = $displayOptions.getFlyoverTopOfCursor();
FlyOverArea.style.left = Number(thisForm.mousex.value) + Number(thisForm.scrollx.value) - Number(FoLeft);
FlyOverArea.style.top = Number(thisForm.mousey.value) + Number(thisForm.scrolly.value) - Number(FoTop);
var maxX = (window.screen.width * $displayOptions.getFlyoverThreshold())/100;
// If the mouse is at the extreme right corner the max threshold should the tooltip be //placed.
if(FlyOverArea.style.posLeft > (window.screen.width - maxX)){
FlyOverArea.style.left = window.screen.width - maxX;
}
FlyOverArea.style.display = "";
ToClear = setTimeout( "ClearFlyOver()", $displayOptions.getFlyoverVisibleTimeWithCursor(), "JAVASCRIPT" );//set timeout
}
<DIV ID=FlyOverArea CLASS="FO" STYLE="display: none">
</DIV>
Я подозреваю, что это с style.top
и style.left
и пробовал тоже с style.pixelLeft,style.posleft
, но безрезультатно