Skip navigation
Currently Being Moderated

How to change text in SVG via external javascript

Dec 1, 2010 9:16 AM

I want to dynamically change the value of text from my SVG built in illustrator. I've tried many examples on the web, but they don't actually work. Has someone at Adobe, using the new pack done this?

 
Replies
  • Currently Being Moderated
    Dec 6, 2010 12:45 AM   in reply to Cole Joplin

    ...

    var elem = document.getElemetById("textElem"); // Assuming textElem is the id of text object in SVG.

    textElem.firstChild.nodeValue = "Nex Text Here";

     

    ...

     

     

    This should work for you. Not anything related to HTML5 pack though.

     

    --

    GJ

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points