I'm trying to dynamiccaly create a link to an svg element. Any ideas
why this doesn't work?
<svg>
<script onload="init(evt)">
function init(evt) {
var SVGDoc = evt.getTarget().getOwnerDocument();
var text_elem = SVGDoc.getElementById("text_elem");
var a_elem = SVGDoc.createElement("a");
var text_node = SVGDoc.createTextNode("This is a link");
a_elem.setAttributeNS
("http://www.w3.org/2000/xlink","xlink:href","http://www.kevlindev.co
m");
a_elem.setAttribute("id", "link");
a_elem.setAttribute("target", "_blank");
a_elem.appendChild(text_node);
text_elem.appendChild(a_elem);
}
</script>
<text id="text_elem" x="0" y="1em"> </text>
</svg>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Protect your PC from spy ware with award winning anti spy technology. It's free.
http://us.click.yahoo.com/97bhrC/LGxNAA/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/