SVG structure
<g id="someID" gmwmsvg:typ="l" gmwmsvg:pri="10 00">
<g id="gwmg4" class="D5F2B3w3 j6" gmwmsvg:hi="D5F 2B3w3j6 R2v1p1o6r3">
<use xlink:href="#D5 F2B3w3j6" x="9916" y="2711"
gmwmsvg:act="Ja vaScript:SetFea tureID('P' + '10380');"></use>
<use xlink:href="#D5 F2B3w3j6" x="6995" y="2834"
gmwmsvg:act="Ja vaScript:SetFea tureID('P' + '10390');"></use>
<use xlink:href="#D5 F2B3w3j6" x="4644" y="3775"
gmwmsvg:act="Ja vaScript:SetFea tureID('P' + '10379');"></use>
<use xlink:href="#D5 F2B3w3j6" x="8604" y="6546"
gmwmsvg:act="Ja vaScript:SetFea tureID('P' + '10375');"></use>
</g>
</g>
Code: (variable X,Y,sAction appropriately set)
ele=doc.getElem entById("someID ");
nodes=ele.getEl ementsByTagName ("g");
ch=doc.createEl ement("use");
ch.setAttribute ("xlink:href",n odes.item(0).ge tAttribute("cla ss"));
ch.setAttribute ("x",X);
ch.setAttribute ("y",Y);
ch.setAttribute ("gmwmsvg:act", sAction);
nodes.item(0).a ppendChild(ch);
nothing happens - any ideas?
<g id="someID" gmwmsvg:typ="l" gmwmsvg:pri="10 00">
<g id="gwmg4" class="D5F2B3w3 j6" gmwmsvg:hi="D5F 2B3w3j6 R2v1p1o6r3">
<use xlink:href="#D5 F2B3w3j6" x="9916" y="2711"
gmwmsvg:act="Ja vaScript:SetFea tureID('P' + '10380');"></use>
<use xlink:href="#D5 F2B3w3j6" x="6995" y="2834"
gmwmsvg:act="Ja vaScript:SetFea tureID('P' + '10390');"></use>
<use xlink:href="#D5 F2B3w3j6" x="4644" y="3775"
gmwmsvg:act="Ja vaScript:SetFea tureID('P' + '10379');"></use>
<use xlink:href="#D5 F2B3w3j6" x="8604" y="6546"
gmwmsvg:act="Ja vaScript:SetFea tureID('P' + '10375');"></use>
</g>
</g>
Code: (variable X,Y,sAction appropriately set)
ele=doc.getElem entById("someID ");
nodes=ele.getEl ementsByTagName ("g");
ch=doc.createEl ement("use");
ch.setAttribute ("xlink:href",n odes.item(0).ge tAttribute("cla ss"));
ch.setAttribute ("x",X);
ch.setAttribute ("y",Y);
ch.setAttribute ("gmwmsvg:act", sAction);
nodes.item(0).a ppendChild(ch);
nothing happens - any ideas?
Comment