Well done!
Actually I have to check if it's a descendant of the ancestor and not
the target :
----------------------------------------
if (/MSIE/.test(navigator.userAgent)) { // I still use prototype
v1.5.1
Event.observe($("divLangue")), "mouseleave", function (e) {
alert("");
});
} else {
Event.observe($("divLangue")), "mouseout", function (e) {
if (e.relatedTarget && !e.relatedTarget.descendantOf($
("divLangue"))) {
alert("");
}
});
}
----------------------------------------
Unfortunately, I get an exception with Firefox : "'Permission denied
to get property HTMLDivElement.parentNode' when calling method:
[nsIDOMEventListener::handleEvent]"
which I "prevent" with a try catch.
Thanks à lot.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---