Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > svg - adding use tag

Reply
Thread Tools

svg - adding use tag

 
 
tino.cindric@gmail.com
Guest
Posts: n/a
 
      07-12-2006
SVG structure

<g id="someID" gmwmsvg:typ="l" gmwmsvgri="1000">
<g id="gwmg4" class="D5F2B3w3j6" gmwmsvg:hi="D5F2B3w3j6 R2v1p1o6r3">
<use xlink:href="#D5F2B3w3j6" x="9916" y="2711"
gmwmsvg:act="JavaScript:SetFeatureID('P' + '10380');"></use>
<use xlink:href="#D5F2B3w3j6" x="6995" y="2834"
gmwmsvg:act="JavaScript:SetFeatureID('P' + '10390');"></use>
<use xlink:href="#D5F2B3w3j6" x="4644" y="3775"
gmwmsvg:act="JavaScript:SetFeatureID('P' + '10379');"></use>
<use xlink:href="#D5F2B3w3j6" x="8604" y="6546"
gmwmsvg:act="JavaScript:SetFeatureID('P' + '10375');"></use>
</g>
</g>

Code: (variable X,Y,sAction appropriately set)

ele=doc.getElementById("someID");
nodes=ele.getElementsByTagName("g");
ch=doc.createElement("use");
ch.setAttribute("xlink:href",nodes.item(0).getAttr ibute("class"));
ch.setAttribute("x",X);
ch.setAttribute("y",Y);
ch.setAttribute("gmwmsvg:act",sAction);
nodes.item(0).appendChild(ch);

nothing happens - any ideas?

 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      07-12-2006


wrote:

> SVG structure


See answer in comp.lang.javascript.

--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
svg - adding use tag no_ti Javascript 2 07-12-2006 01:07 PM
[SVG] probleme dessin d'images SVG avec Batik Mardagg Java 0 05-12-2006 02:13 PM
[SVG] problem with SVG image drawing with Batik Library Mardagg Java 0 05-12-2006 02:12 PM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
[SVG] using image-tag to integrate SVG in SVG Arne Nordmann XML 0 06-28-2004 01:16 PM



Advertisments