Hi,
Thanks for the answer.
No, I don't call the fonction "stopPropagation".
Here is a simpler example that doesn't work either :
<g onmousedown="alert('down');" onmouseup="alert('up');">
<circle onclick="alert('circle1')" fill="black" r="5" cx="5" cy="5"/>
<circle onclick="alert('circle2')" fill="black" r="5" cx="0" cy="0"/>
</g>
Only the alert('down') and alert('up') are called in this case.
I use IE7 and Adobe SVG Viewer 3.0
Thanks again for your help.
--- In [email protected], Helder Magalhães
<[EMAIL PROTECTED]> wrote:
>
> > <g onmousedown="down(evt);" onmouseup="up(evt);">
> > <circle onclick="alert('circle1')" fill="black" r="5" cx="5"
cy="5"/>
> > <circle onclick="alert('circle2')" fill="black" r="5" cx="0"
cy="0"/>
> > </g>
> >
> > My problème is that the onclick event is never called, apparently
> > because of the onmousedown and onmouseup events called in the
first g.
> > What should I do to be able to call another function when a
circle is
> > clicked ?
>
> I suspect (no deep testing/analysis, sorry!) you are calling
> "stopPropagation" within the "down" method. If you are, then the
> behavior is expected - the event is first triggered in the group
("g"
> element) and then it's passed to children. Calling "stopPropagation"
> breaks this mechanism.
>
> If my feeling is wrong, then please provide more relevant details
such
> as the SVG viewer you are using (version included), operating
system,
> etc. and, if possible, a complete test case - without seeing the
> script which is executed one will be guessing anyway...
>
> Hope this helps,
>
> Helder Magalhães
>
------------------------------------
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/svg-developers/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/