jophof007 schrieb:

> Hi,
>
> I want to create a path element by means of the DOM insertion I use
> this piece of code. No path is on my drawboard:
>
> <?xml version="1.0" standalone="no"?>
> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
> "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
> <svg xmlns="http://www.w3.org/2000/svg";
>      xmlns:xlink="http://www.w3.org/1999/xlink";
>      width="99%"
>      height="99%"
>      onload="init()">
>     
> <script type="text/javascript"> <![CDATA[
> function init() {
>   var drawBoard = document.getElementById ("drawBoard");
>   newnode = document.createElement ("path");

-->  newnode = document.createElementNS ("http://www.w3.org/2000/svg"; , 
"path")
for more info on this see:
http://wiki.mozilla.org/SVG:Namespace

>   newnode.setAttribute("d", "M 400 220 l 0 50 l 112.07814025878906 0 l
> 0 -50 z");
>   newnode.setAttribute ("style","fill:#ff0000;");
>   drawBoard.appendChild( newnode );
> }
>
> ]]>
> </script>
>
>   <g id="drawBoard" >
>     <!--
>     <path d="M 400 220 l 0 50 l 112.07814025878906 0 l 0 -50 z"
> style="fill:#ff0000;"/>
>     -->
>   </g>   
>
>
> </svg>
>
> Does anyone has a tip?
> If i uncomment the path statement the path is drawn.
>
> Thanx!
>
> John
>
>



-----
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/
 



Reply via email to