ohaya wrote
I'm trying to debug a problem with a page, and I was wondering if there was
any way to capture all events within a BODY? I don't know if this is
possible, but I was thinking of something like:
<BODY onEvent="mydebugfunction();">
In case you're wondering, what I'm trying to do is to determine what
event(s) are occurring with a certain combination of mouse events.
I know that this question is somewhat vague :(... My apologies.
With IE4+, Netscape 6/7, Mozilla, Opera 7 you can use an event handler
for a certain event e.g. the mouseover event and handle that at the body
e.g.
<body onmouseover="mydebugfunction(event);">
If you want to handle other events too you need additional handlers e.g.
<body onmouseover="mydebugfunction(event);"
onmouseout="mydebugfunction(event);"
onmousemove="mydebugfunction(event);">
As for finding out which events exist a look at the relevant
documentation could help, for IE check out
http://msdn.microsoft.com/library/de...nce/events.asp
for Mozilla, Netscape 6/7, and Opera 7 check the HTML documentation for
the event handlers defined there and the W3C DOM Level 2 Events module,
both available on
http://www.w3.org/
--
Martin Honnen
http://JavaScript.FAQTs.com/