Discussion Locked

Pop up menu visibility(with javascript)

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I've designed a menu,but I've a problem on controling the visibility of pop up lists.
You can see the same problem in dbai municipality site.(www.dm.gov.ae)
When I move mouse to the other part of form as the menu is visible,it should hide but I can't do that.Because each time I try to do this by losting focus from list's header list's visibility gets false.

3 replies

by bill_h

The placement of brackets in the 'dropit2' function is your first problem. Change the 'dropit2' function to:

function dropit2(whichone)
{
if (window.themenu&&themenu.id!=whichone.id)
themenu.style.visibility="hidden"
themenu=whichone
if (document.all)
{
themenu.style.left=
document.body.scrollLeft+event.clientX- event.offsetX
themenu.style.top=
document.body.scrollTop+event.clientY- event.offsetY+20
if (themenu.style.visibility=="hidden")
{
themenu.style.visibility="visible"
themenu.style.zIndex=zindex++
}
}
else
{
hidemenu(whichone)
}
}

This will allow the dropdown menus to display consistently as the pointer is moved from menu to menu. However, a menu will then *remain* displayed even if the pointer is moved to another part of the form. To take care of this, modify the form definition to:

This discussion is closed to new replies.