Hi!
I want to show a popup table just left-above my corsor. The following
code works fine (on IE), but if there are scrollbars at the browser
the popup is not positionend correctly:
*************** *************** *************** *************** *****
....
function ShowPopup() {
document.getEle mentById(ShowPo pup.arguments[0]).style.visibil ity =
'visible'
document.getEle mentById(ShowPo pup.arguments[0]).style.top =
event.y - document.getEle mentById(ShowPo pup.arguments[0]).offsetHeight
document.getEle mentById(ShowPo pup.arguments[0]).style.left=
event.x - document.getEle mentById(ShowPo pup.arguments[0]).offsetWidth
}
function HidePopup() {
document.getEle mentById(HidePo pup.arguments[0]).style.visibil ity =
'hidden'
}
....
<a href="www.googl e.com" onmouseover="Sh owPopup('ID_01' )"
onmouseout="Hid ePopup('ID_01') ">PopItUp</a>
....
<table id="ID_01" style="position :absolute; visibility:hidd en">
<tr><td>This is a popup</td></tr>
</table>
....
*************** *************** *************** *************** *****
I can't figure out what i have to do if there are scrollbars.
As a second question: what do i have to change to let it work on NN?
Thanks Helmut
I want to show a popup table just left-above my corsor. The following
code works fine (on IE), but if there are scrollbars at the browser
the popup is not positionend correctly:
*************** *************** *************** *************** *****
....
function ShowPopup() {
document.getEle mentById(ShowPo pup.arguments[0]).style.visibil ity =
'visible'
document.getEle mentById(ShowPo pup.arguments[0]).style.top =
event.y - document.getEle mentById(ShowPo pup.arguments[0]).offsetHeight
document.getEle mentById(ShowPo pup.arguments[0]).style.left=
event.x - document.getEle mentById(ShowPo pup.arguments[0]).offsetWidth
}
function HidePopup() {
document.getEle mentById(HidePo pup.arguments[0]).style.visibil ity =
'hidden'
}
....
<a href="www.googl e.com" onmouseover="Sh owPopup('ID_01' )"
onmouseout="Hid ePopup('ID_01') ">PopItUp</a>
....
<table id="ID_01" style="position :absolute; visibility:hidd en">
<tr><td>This is a popup</td></tr>
</table>
....
*************** *************** *************** *************** *****
I can't figure out what i have to do if there are scrollbars.
As a second question: what do i have to change to let it work on NN?
Thanks Helmut
Comment