elementFromPoint netscape/mozilla equivilent

D

Darren

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
 
M

Martin Honnen

Darren said:
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.
 
D

Darren

Martin Honnen said:
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?[/QUOTE]
 
M

Martin Honnen

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>
 
D

Darren

Martin Honnen said:
Darren wrote:



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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top