Need scripting help

19 views
Skip to first unread message

Sudharsan Thiru

unread,
Jul 31, 2013, 7:31:16 AM7/31/13
to svg...@googlegroups.com
I am using svg2vml in project. I need to get the path element. In IE pathElem is returned as null / undefined.

var myG7 = document.createElementNS("http://www.w3.org/2000/svg", "g");
myG7.setAttribute("id", "7");
var path7 = document.createElementNS("http://www.w3.org/2000/svg", "path");
myG7.appendChild(path7);
mySvg.appendChild(myG7);

var myG8 = document.createElementNS("http://www.w3.org/2000/svg", "g");
myG8.setAttribute("id", "8");
var path8 = document.createElementNS("http://www.w3.org/2000/svg", "path");
myG8.appendChild(path8);
mySvg.appendChild(myG8);

//var pathEle = document.getElementsByTagName("path");
var npaths = 8;
var diff = (360*1)/(npaths*1);
for (var i=0;i<npaths;i++){
var pathElem = mySvg.getElementsByTagName("g")[i].getElementsByTagName("path")[0];


Reply all
Reply to author
Forward
0 new messages