470,619 Members | 1,860 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,619 developers. It's quick & easy.

elementFromPoint netscape/mozilla equivilent

Hi. I have a javascript menu system which uses the "elementFromPoint"
function. However Netscape/Mozilla doesn't recognise this function. Does it
have an equivilent?

Thanks

--
Darren
Aug 6 '05 #1
4 3002


Darren wrote:
I have a javascript menu system which uses the "elementFromPoint"
function. However Netscape/Mozilla doesn't recognise this function. Does it
have an equivilent?


As far as I know there is no direct equivalent to that method in
Mozilla. However people have build menu systems for Mozilla without that
method so when you show us in what context you need that method it is
possible that we can suggest a way to solve the problem in Mozilla
without the method.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Aug 6 '05 #2

"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:42***********************@newsread4.arcor-online.net...


Darren wrote:
I have a javascript menu system which uses the "elementFromPoint"
function. However Netscape/Mozilla doesn't recognise this function. Does it have an equivilent?
As far as I know there is no direct equivalent to that method in
Mozilla. However people have build menu systems for Mozilla without that
method so when you show us in what context you need that method it is
possible that we can suggest a way to solve the problem in Mozilla
without the method.


Absolutely.
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.
Does any of that make sense?
--
Darren
--

Martin Honnen
http://JavaScript.FAQTs.com/


Aug 6 '05 #3


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/
Aug 8 '05 #4

"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:42***********************@newsread4.arcor-online.net...


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>

Nail on the head Marten. I'll give that doc a look. My javascript
references are rather dated. Do you know of one that's up todate and coveres
NN and IE variants?

Ta.
--

Martin Honnen
http://JavaScript.FAQTs.com/

Aug 9 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Marco | last post: by
9 posts views Thread by rez | last post: by
2 posts views Thread by Kevin Ly | last post: by
10 posts views Thread by News | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.