Re: HELP!! click on child elements and return id? Please Help!!
- Thanks dude I got it working now!!
I owe you one
--- In email@example.com, Thomas DeWeese
> lemuelSquelch wrote:returns
> > Hi I have got my jSvgcanvas so that when I click on it, it
> > the id of the first element. What I need is for it to returnthe id
> > of the child element that is clicked on (hope this makessense).
> > here is my svg code for that bit ...r="5"
> I already showed you how to attach a listener to the element's
> and get called back when the click happens. If you didn't know it
> 'evt.getTarget()' returns the actual element clicked on. So you
> can get it's 'id' attribute.
> > <g id="dynamic"><circle r="5" id="1" cx="20" cy="20"/><circle
> > id="2" cx="50" cy="80"/></g></svg>firstname.lastname@example.org
> > By using the java commands
> > Element test = (Element)(elt.getFirstChild());
> > String test1 = test.toString();
> > String svgid = test.getAttribute("id");
> > I can return the id "1" but if i click on circle with id "2" it
> > still returns id "1".
> > Since these circles are both child elements of the "dynamic"
> > element, is there a way of me getting the id's back?
> > Thanks
> > -----
> > To unsubscribe send a message to: svg-developers-
> > -or-click "edit my membership"
> > visit http://groups.yahoo.com/group/svg-developers and
> > ----
> > Yahoo! Groups Links
> > To visit your group on the web, go to:
> > http://groups.yahoo.com/group/svg-developers/
> > To unsubscribe from this group, send an email to:
> > email@example.com
> > Your use of Yahoo! Groups is subject to:
> > http://docs.yahoo.com/info/terms/