Hi Holger, first thanks for the trick with the g element, it was so simple! Do you know if correspondingUseElement is Adobe specific or is part of W3C DOM specs?
--- In [EMAIL PROTECTED], Holger Will <[EMAIL PROTECTED]> wrote: > hi ggb2g > > in asv6 you would do something like this,(im not sure but i gues it > alsoworks in batik) > > var node=evt.target.correspondingUseElement.parentNode > but as far as i remember correspondingUseElement is not implemented in > ASV3. > > why dont you go: > > <g id="groupMyId"> > <g onclick="myfunction(evt)"><use xlink:href="#myref" /></g> > <rect ... /> > </g> > > > so in myfunction, > evt.target.firstChild is the useElement, and evt.target.parentNode is > the outer group. > > hth > holger > > ggb2g wrote: > > > > > Hi all, > > > > I have the following kind of svg: > > <g id="groupMyId"> > > <use xlink:href="#myref" onclick="myfunction(evt)" /> > > <rect ... /> > > </g> > > my problem is that I need to get g id from myfunction() but since the > > use element is a XLink Namespace and not directly SVG I cannot use > > something like: > > > > var node = evt.Target.parentNode; > > > > Of course if I duplicate myref element directly it just works. > > Any suggestion? I have searched around but could not find any solution > > yet, So far I am not using the use element but this is not really an > > elegant way for my code. ------------------------ Yahoo! Groups Sponsor --------------------~--> Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar. Now with Pop-Up Blocker. Get it for free! http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/1U_rlB/TM --------------------------------------------------------------------~-> ----- 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/ <*> 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/

