--- In [email protected], Cameron McCormack <cam-svg-
[EMAIL PROTECTED]> wrote:
> Hi algornik7.
> 
> algornik7:
> >       shape.setAttribute("xlink:href","some_pic.jpg");
> 
> You need to use a namespace for this attribute:
> 
>   shape.setAttributeNS
>     ("http://www.w3.org/1999/xlink";, "xlink:href", "some_pic.jpg");
> 
> -- 
>   e-mail : cam (at) mcc.id.au         icq : 26955922
>      web : http://mcc.id.au/          msn : cam-msn (at) 
aka.mcc.id.au
>   office : +61399055779                    jabber : heycam (at) 
jabber.org

Hello. Thank you very much for your answer. But with namespace it 
also doesn't  work. Image is in the same directory as the svg 
document. There is my example with your changes as for namespace.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
  "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>

<svg onload="makeShape(evt)"
     xmlns="http://www.w3.org/2000/svg";>
 <script type="text/javascript"><![CDATA[
 {
     var svgns = "http://www.w3.org/2000/svg";;

    function makeShape(evt) 
    {
      if ( window.svgDocument == null )
          svgDocument = evt.target.ownerDocument;



            var shape = svgDocument.createElement("image");
            shape.setAttributeNS(null, "x", 10);
            shape.setAttributeNS(null, "y", 10);
            shape.setAttributeNS(null, "height",  51);
            shape.setAttributeNS(null, "width", 43); 

            shape.setAttributeNS
("http://www.w3.org/1999/xlink ","xlink:href","s.png");
            
    

    
      svgDocument.documentElement.appendChild(shape);

    }
 }
]]>
</script>
</svg>

  




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/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/
 


Reply via email to