Darren wrote:
Its a menu system that uses divs. When you move the mouse over the menu
head, the onmouseover event executes and draws the submenu. The submenu has
an onmouseout fucntion that hides submenu supposidly when the mouse leaves
the submenu, but the items wuthin the submenu are divs. I tried replacing
them with anchors but then the class expansions in the style sheet didn't
work. so when i point to a menuitem in the submenu the onmouseout is
triggered and the submenu is hidden. I got round this problem by creating a
function that checks whether the div is an item of the submenu by using the
'elementFromPoint' function.
Sounds you simply want to check whether a certain node is contained in
another node, IE has the contains method for that, for Mozilla you have
to walk the DOM and do the check yourself, example is here:
<http://www.faqts.com/knowledge_base/view.phtml/aid/1606/fid/145>
--
Martin Honnen
http://JavaScript.FAQTs.com/