473,471 Members | 2,017 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Capture all events in BODY?

Hi,

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.

Jim
Jul 23 '05 #1
2 2672


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/

Jul 23 '05 #2

"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:40********@olaf.komtel.net...


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...thor/dhtml/ref
erence/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,

Thanks, it looks like the "onScroll" event will do it for me with IE. I'm
still trying to get a definitive answer (from my people) as to whether we
need to support Netscape (but I don't think so, since none of the machines
in our lab have it :().

Jim
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: aimee | last post by:
Hi. Is there a way to capture the events fired in a PrintDialog? I would like to capture when the user presses "Print" so I can do some cleanup. The asp.net (IE6) application I'm working on has 6...
2
by: Rich Tasker | last post by:
My goal is to execute a DTS package that calls multiple child DTS packages from a C# (2003) app and display the progress of the entire process to the user. I have followed the model defined in...
2
by: jva02 | last post by:
Hi, I'm confused why I can capture an event fired by an ActiveX object when it's loaded via an <object> tag, but not when loaded using "new ActiveXObject". Here's a basic example: vb ActiveX...
3
by: Dave | last post by:
Hi, I have a control on my vb app form that dont cath a mouse event`s how can i catch a mouse event on that control and pass it to a function in my main form??? In VB-6 i used the setcapture api...
0
by: Vin | last post by:
The .Net 2.0's webbrowser is neat and pretty. But I am not able to capture Key events when the focus is on the webbrowser control in my winform. Options tried. 1. Wrote a class which extends this...
4
by: Venkatesh | last post by:
Hello All, I have an iframe in my main html and within iframe, I'm loading another HTML webpage. In my main html page, I've captured the mouse click event, by setting the "onclick" for <bodyof...
2
by: =?Utf-8?B?c25naWxi?= | last post by:
The WebBrowser control is described as exposing numerous public mouse events. See: http://msdn2.microsoft.com/en-us/library/ayestehw.aspx. many of the event are described as: "This event is not...
4
by: mbatestblrock | last post by:
I hope this makes some sense. My ultimate goal here is to execute a block of code if the mouse has not moved in a minute or so within the broswer. The machine I am running this on is for internal...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.