Erik - very cool thanks for that tip! --- In [email protected], Erik Dahlström <[EMAIL PROTECTED]> wrote: > > Often overlooked SVG 1.1 DOM syntax[1]: > > theimage.href.baseVal = "newimage.png"; > > For a working example see > > http://svgopen.org/2008/presentations/70-Tricks_of_Javascript_and_declarative_animation/index.html#slide13 > > Cheers > /Erik > > On Thu, 25 Sep 2008 18:23:04 +0200, Jeff Schiller <[EMAIL PROTECTED]> wrote: > > > You have to use namespace-aware API methods: > > > > setAttributeNS("http://www.w3.org/1999/xlink", "href", signalName); > > > > Regards, > > Jeff > > > > --- In [email protected], "zedkineece" <zedkineece@> > > wrote: > >> > >> I am trying to set the value of xlink:href, but having issues trying > >> to understand how to set it with the xlink namespace. I am getting the > >> value of an id attribute, appending with a ".png:, then trying to set > >> the value of the xlink:href with the value of the id attribute with > >> the .png appended. It all works, except for accessing and setting the > >> xlink:href value. > >> > >> partial code: > >> > >> <g id="img"> > >> <image id="placeholder" x="3" y="3" width="350" height="200" > >> style="visibility: hidden" xlink:href="images/img.png"/> > >> </g> > >> > >> imgElem = svgdoc.getElementById("placeholder"); > >> signalName = svgdoc.getElementById(elId).getAttribute('id') + ".png"; > >> > >> ... > >> > >> imgElem.setAttribute("xlink:href",signalName); > >> > >> any help is greatly appreciated. > >> > >> zed > >> > > > > > > > > > > -- > Erik Dahlstrom, Core Technology Developer, Opera Software > Co-Chair, W3C SVG Working Group > Personal blog: http://my.opera.com/macdev_ed >
------------------------------------ ----- 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/

