You've made a fundamental mistake. 1. The idea behind a defs section is to resuse (have multiple copies) of an definition. 2. The idea of an ID attribute is to only have one attribute with a specific value document wide (see xs:ID type - <http://www.w3.org/TR/xmlschema-2/#ID>).
So therefore you have a fundamental mistake. The defs section and the id invalidate each other. The only thing you could (possibly) do would be to getElementById( "useFrame2" ).childNodes.foo.bar to get the tspan. Maybe, i don't guarantee it. Alastair --- In [email protected], Sean <[EMAIL PROTECTED]> wrote: > > I would like to use the use tags to save much text size as below. > Problem is grabbing and editing data with onclick events. The id for my > tspan would always be the same, but they would be used in different use > tags with unique IDs. Is there a way to isolate say the tspan1 under > useFrame2? > > SVG > <defs> > <g id="textFrame" cat="textBox"> > <text cat="textBox" font-size="14" font="sans-serif" ><tspan > id="tspan1" cat="textBox">Text</tspan></text> > <text><tspan visibility="hidden" id="tspan2"></tspan></text> > </g> > </defs> > <use id="useFrame" onclick="edit2(evt);" xlink:href="#textFrame" > transform="translate(10,25)"/> > <use id="useFrame2" onclick="edit2(evt);" xlink:href="#textFrame" > transform="translate(10,50)"/> > > JS > function edit2(evt){ > var objet=evt.target; > var tspan1 = objet.getElementById("tspan1"); //Doesn't work > } > > Thanks! > > Sean > > -- > "I'd rather have a bottle in front of me, than a frontal lobotomy." > -- Tom Waits > ----- 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/

