problem with an integration of SVG in html

jojoba
07-02-2004, 07:39 AM
Hello i've got some problems with the integration of svg in a html page. I've learnt that i had to use a "<object>" or a "<embed>" tag to do it. That works fine, but I would like to use a "onChange" attribute to launch a javascript when the user clicks on the svg drawing. I tried to put the onChange attribute on both of the <object> and <embed> tag but the mouse click is never detected. Why? How can I make my svg clickable without writing into its code.
Thanks

Anonymous
07-02-2004, 10:01 AM
With script in html you can add event to your embedded svg with addEventListener.

See
http://www.learnsvg.com/tutorial2/catalog.php
and click on addEventListener for example

Michel

Re
10-20-2004, 02:46 AM
do not use <object>,
use<embed>
<embed width="750" height="500" src="catalog.svg" type="image/svg+xml" />

 
Web mp2kmag.com
mapforums.com

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum