Sushmitha
07-07-2005, 07:21 AM
i have written a text in a svg document..
dynamically i want to erase the text...
is it possible.. if so how to do that..
Thanks,
Suvacini
Anonymous
07-08-2005, 01:08 AM
Give id to your text, "MyText" by example and two solutions
(Suppose svgdoc is your svg document defined by example by
svgdoc = evt.target.ownerDocument on loading svg )
- remove text element with
svgdoc.getElementById("Mytext").parentNode.removeChild(svgdoc.getElementById("Mytext"))
- replace text by blank
svgdoc.getElementById("Mytext").firstChild.data = " "
Michel