Thnx Doug,
 
  It Worked.
 
  Regards Felix

-----Original Message-----
From: Doug Schepers [mailto:[EMAIL PROTECTED] 
Sent: 26 October 2004 08:25
To: [EMAIL PROTECTED]
Subject: RE: [svg-developers] Image Creation Dynamically


Hi, Felix-

Try this:

var m_SVGDocument= document.embeds["svgdocument"].getSVGDocument();
var newElement = m_SVGDocument.createElementNS("http://www.w3.org/2000/svg
<http://www.w3.org/2000/svg> ",
"image");
newElement.setAttributeNS("http://www.w3.org/1999/xlink
<http://www.w3.org/1999/xlink> ",
"href","images/sampleimage.gif");
newElement.setAttributeNS(null, "x","20");
newElement.setAttributeNS(null, "y","20");
newElement.setAttributeNS(null, "width","50");
newElement.setAttributeNS(null, "height","50");
m_SVGDocument.documentElement.appendChild(newElement); 

Regards-
Doug Schepers

doug . schepers  @ vectoreal.com
www.vectoreal.com

"Move into the future..." 

| -----Original Message-----
| From: Felix Moses [mailto:[EMAIL PROTECTED] 
| Sent: Tuesday, October 26, 2004 12:03 AM
| To: '[EMAIL PROTECTED]'
| Subject: RE: [svg-developers] Image Creation Dynamically
| 
| 
| Sorry Folks,
|  
|    This is the code I am using 
|  
|   var m_SVGDocument= document.embeds["svgdocument"].getSVGDocument();
|  var newElement = m_SVGDocument.createElement("image");
|  newElement.setAttribute("xlink:href","images/sampleimage.gif");
|  newElement.setAttribute("x","20");
|  newElement.setAttribute("y","20");
|  newElement.setAttribute("width","50");
|  newElement.setAttribute("height","50");
|  m_SVGDocument.documentElement.appendChild(newElement); 
|  
|    Felix
| 
| 
| -----Original Message-----
| From: Felix Moses [mailto:[EMAIL PROTECTED]
| Sent: 26 October 2004 07:59
| To: '[EMAIL PROTECTED]'
| Subject: RE: [svg-developers] Image Creation Dynamically
| 
| 
| Hi,
| 
|     I tried to create a image element dynamically in the 
| Javascript and the
| code that i am using is below
| 
|    var m_SVGDocument= 
| document.embeds["svgdocument"].getSVGDocument(); 
|   var newElement = m_SVGDocument.createElement("image"); 
|   newElement.setAttribute("xlink:href","images/sampleimage.gif");
| newElement.setAttribute("x","20"); 
| newElement.setAttribute("y","20"); 
| newElement.setAttribute("width","50"); 
| newElement.setAttribute("height","50"); 
| m_SVGDocument.documentElement.appendChild(newTextElement); 
| 
| 
| But nothing is getting displayed. But this works fine if I 
| try to create a
| other elements like rect,cirlce etc. Should I use any extra 
| attribute to
| display the image.
| 
|            Felix



-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers
<http://groups.yahoo.com/group/svg-developers>  and click "edit my
membership"
---- 



Yahoo! Groups Sponsor   

ADVERTISEMENT
 
<http://us.ard.yahoo.com/SIG=129o23t5i/M=315388.5526708.6599542.3001176/D=gr
oups/S=1706030389:HM/EXP=1098851201/A=2372354/R=0/SIG=12id813k2/*https://www
.orchardbank.com/hcs/hcsapplication?pf=PLApply&media=EMYHNL40F21004SS> click
here    
 
<http://us.adserver.yahoo.com/l?M=315388.5526708.6599542.3001176/D=groups/S=
:HM/A=2372354/rand=871187291>   


  _____  

Yahoo! Groups Links


*       To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<http://groups.yahoo.com/group/svg-developers/> 
  

*       To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> 
  

*       Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> . 




[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/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