- From: Joseph Kesselman <keshlam@us.ibm.com>
- Date: Mon, 12 Mar 2001 09:59:49 -0500
- To: www-dom@w3.org
I have a problem.....I want to capture the user selections/clicks in the browser....and find out the >corresponding node in the DOM and then take control of it. The user may click on any control or just static text on the page. How can this be achieved..??? You may not realize it, but you're asking two seperate questions. 1) How to capture events in the DOM. If your DOM implements the DOM Level 2 Events module, you can register a capturing Event Listener on any node which will recieve the event before its children do. (The event itself says which node it was actually sent to.) If that listener wants to do so, it can prevent further processing of the event; see the discussion of "event cancellation" in that chapter of the DOM spec. So installing a capturing listener at the root element (for example) would allow you to catch, process, and discard events for any node lower in the document. 2) However: If your application performs its own event handling _outside_ the DOM's framework in addition to using DOM events, we have no way to access or control that activity. So how complete the capturing will be depends in large part on how your particular browser was written. You may find that you have to talk to the browser authors about your needs and how best to address them ______________________________________ Joe Kesselman / IBM Research ______________________________________ Joe Kesselman / IBM Research ---------------------- Forwarded by Joseph Kesselman/Watson/IBM on 03/12/2001 09:57 AM --------------------------- Delivery Failure Report Your Re: Control over HTML DOM document: was not amittr@mahindrabt.com delivered to: because: Enhanced Mail System Status Code (RFC1893): .0.0 What should you do? You can resend the undeliverable document to the recipients listed above by choosing the Resend button or the Resend command on the Actions menu. Once you have resent the document you may delete this Delivery Failure Report. If resending the document is not successful you will receive a new failure report Unless you receive other Delivery Failure Reports, the document was successfully delivered to all other recipients. D01HUB03/01/H/IBM, D01ML243/01/M/IBM ________________________ To: "Amit Tripathi \"VSNL\"" <amit.t@vsnl.net> cc: From: Joseph Kesselman/Watson/IBM@IBMUS Date: 03/12/2001 09:41:18 AM Subject: Re: Control over HTML DOM > I have a problem.....I want to capture the user selections/clicks in the browser....and find out the >corresponding node in the DOM and then take control of it. The user may click on any control or just > static text on the page. How can this be achieved..??? You may not realize it, but you're asking two seperate questions. 1) How to capture events in the DOM. If your DOM implements the DOM Level 2 Events module, you can register a capturing Event Listener on any node which will recieve the event before its children do. (The event itself says which node it was actually sent to.) If that listener wants to do so, it can prevent further processing of the event; see the discussion of "event cancellation" in that chapter of the DOM spec. So installing a capturing listener at the root element (for example) would allow you to catch, process, and discard events for any node lower in the document. 2) However: If your application performs its own event handling _outside_ the DOM's framework in addition to using DOM events, we have no way to access or control that activity. So how complete the capturing will be depends in large part on how your particular browser was written. You may find that you have to talk to the browser authors about your needs and how best to address them ______________________________________ Joe Kesselman / IBM Research
Received on Monday, 12 March 2001 10:00:00 UTC