Hi, Why do you even have to use getSVGDocument. The document is the svg document and root is document.documentElement. Cheers, Chris
-----Original Message----- From: svg-developers@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Olaf Schnabel Sent: Donnerstag, 29. März 2007 14:47 To: svg-developers Subject: [svg-developers] HTML-SVG in Firefox Hi developers I have a problem with the HTML-to-SVG communication in Firefox. I made a simple example: html_svg.html: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>From HTML to SVG</title> <script type="text/javascript"><!-- function init() { var svgdoc = document.getElementById("mySVG").getSVGDocument(); svgdoc.getElementById("datetext").firstChild.nodeValue = "30"; } //--></script> </head> <body onload="init()"> <h1>HTML to SVG Test</h1> <object type="image/svg+xml" data="svg.svg" width="200" height="200" id="mySVG"> <embed name="mySVG" type="image/svg+xml" src="svg.svg" /> </object> <p>Is this test working?</p> </body> </html> svg.svg: <?xml version="1.0" ?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3. <http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd> org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> <svg width="150px" height="100px" xmlns="http://www.w3. <http://www.w3.org/2000/svg> org/2000/svg"> <text id="datetext" x="10" y="50"> </text> </svg> Firefox 2.0.0.3 (WinXP SP2) says, that getSVGDocument is not a function. In other browsers like Opera 9.10 and IE 7 the example works. Can someone of you give me a hint, why the error in Firefox occurs? Thanks Olaf -- Dr. Olaf Schnabel ETH Zurich Institute of Cartography CH-8093 Zurich Switzerland tel: ++41 44 633 3031 fax: ++41 44 633 1153 e-mail: [EMAIL PROTECTED] <mailto:schnabel%40karto.baug.ethz.ch> baug.ethz.ch www1: http://www.ika. <http://www.ika.ethz.ch/schnabel> ethz.ch/schnabel www2: http://www.e- <http://www.e-cartouche.ch> cartouche.ch [Non-text portions of this message have been removed] ----- 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/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> 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/