<community>of XML and SVG Developers</community>
This is a discussion on Open a SVG IE within the SVG Questions forums, part of the SVG Forums category; Hi, Thanks for a question I asked. I have another question, it is about a diferent way to open a ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| I have another question, it is about a diferent way to open a SVG in the browser, but, without storing the SVG into a file, I mean, putting or storing the SVG code into the same HTML file, and trying open it calling it with an ID. This is a sample: ---------- HTML file <HTML> <svg id="mySVG" width="600" height="400"> .. </svg> <embed src='mySVG' width... height... type="image/svg-xml"> </HTML> ---------- END HTML file I dont know how to do that. The I try to open this document in the Browser, it shows the area of the SVG but It cannot open or doesnt compile or dont use the SVG code that is in the same document. Please, I'll be really glad to know some news about this... ldcv_trabajo@hotmail.com |
| |||
|
Hi ldcv i found this to work,but i only tested with ie 6.0 /asv 3.0. "empty.svg" is just an emty file. <html> <body onload="loadSVG()"> <XML id="doc"> <svg> <rect x="10" y="10" width="100" height="100"/> <a xlink:href="http://www.treebuilder.de"> <circle cx="20" cy="20" r="20" fill="red"/> </a> </svg> </XML> <embed id="emb" src='empty.svg' width="600" height="600" type="image/svg-xml"> <script> function loadSVG(){ var emb=document.embeds("emb") var svg=document.getElementById("doc") var svgDoc=emb.getSVGDocument() var svgWin=emb.getWindow() var newNode=svgWin.parseXML(svg.innerHTML,svgDoc) svgDoc.appendChild(newNode) } </script> </body> </html> hope it helps Holger |
Ink Jet Cartridges
Prink stock over 50,000 ink jet cartridges. Free UK delivery on compatible ink jet cartridges.
epson cartridge
Get an Epson cartridge from us online to make a great saving. We have a comprehensive range and highly competitive prices!
Hard disk drive data recovery cheshire
Call the experts at Data Clinic for hard disk drive data recovery in Cheshire.