Hi, I wrote a program that takes DOM elements from one document (source) and appends them to the DOM root element of another SVG document (target) and rebuilds the GVT tree of the target document. The program was written using official Batik version 1.1.1. However I am encountering an inconsistency in JavaScript event handling which is best illustrated by the example below:
(1) An SVG document (Document A) is displayed on the screen. (2) The user selects a button to add another SVG document which CONTAINS JavaScripting (Document B) to the current SVG document. In the background, I perform the following steps 2.1) build the DOM tree for Document B (using the command "loadSVGDocument(Document B)") 2.2 ) append the DOM tree elements of Document B to the DOM root element of Document A (using commands such as importNode; setOwnerDocument; and appendchild) 2.3) rebuild the DOM & GVT tree of the Document A (using the command "setSVGDocument(Document A)") (3) I redisplay Document A on the screen (now displays elements of Documents A and B). (4) User clicks on an element with JavaScripting, the event is triggered once. This is the EXPECTED result. (5) User selects a button to add another SVG document which DOES NOT CONTAIN JavaScripting (Document C) to the SVG document currently displayed on the screen (Document A) In the background, I perform the following steps 5.1) build the DOM tree for Document C (using the command "loadSVGDocument(Document C)") 5.2 ) append the DOM tree elements of Document C to the DOM root element of Document A (using commands such as importNode; setOwnerDocument; and appendchild) 5.3) rebuild the DOM AND GVT tree of the Document A (using the command "setSVGDocument(document A)") (6) I redisplay Document A on the screen (now displays elements of Documents A,B and C). (7) User clicks on the element with JavaScripting and the event is triggered twice. This is the UNEXPECTED result. Is there a way to resolve the inconsistency that arises at step 7, to ensure that the event is triggered only once upon a mouse click? Thank you. Regards Leakha --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]