Hi, In the code below, the circle and the rect are associated with the the hyperlink and the onclick event; and according to the hierarchy of event handling, the javascript method is called first, the preventDefault() prevents the loading of a.svg. Note the order of <a> and <g> tags.
<svg xmlns:xlink="http://www.w3.org/1999/xlink"> <script type="text/ecmascript"> function TestScript(evt){ alert ("Here"); var ob = evt.preventDefault(); } </script> <a xlink:href="a.svg"> <g onclick="TestScript(evt)"> <circle cx="100" cy="100" r="200" /> <rect x="300" y="300" height="100" width="100" /> </g> </a> </svg> The above svg works fine. The following does not meet my expectations as the clicking of the link on the circle loads the a.svg file and it appears that the circle click is not associated with the TestScript method. <svg xmlns:xlink="http://www.w3.org/1999/xlink"> <script type="text/ecmascript"> function TestScript(evt){ alert ("Here"); var ob = evt.preventDefault(); } </script> <g onclick="TestScript(evt)"> <a xlink:href="a.svg"> <circle cx="100" cy="100" r="200" /> <rect x="300" y="300" height="100" width="100" /> </a> </g> </svg> I would like to know if 1. this is a part of the SVG standard, or is it a small bug in Batik, because Adobe viewer works the same in both the cases. 2. On the off chance that it is a bug, will there be a fix anytime soon? Thanks, Praveen -------------------------------------------------------------------------------- Telelogic Lifecycle Solutions: Helping You Define, Design & Deliver Advanced Systems & Software Learn More at www.telelogic.com Praveen Nayak Software Engineer Telelogic India Pvt Ltd #58, 1- 4 HM Towers, Brigade Road, 560 025 Bangalore India Phone: +91 (80) 419 95800 x194 Fax: Mobile phone: [EMAIL PROTECTED] http://www.telelogic.com Telelogic - Requirements-Driven Innovation! ------------------------------------------------------------- The information contained in this e-mail, including any attachment or enclosure, is intended only for the person or entity to which it is addressed and may contain confidential material. Any unauthorized use, review, retransmissions, dissemination, copying or other use of this information by persons or entities other than the intended recipient is prohibited. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
