XML Elves

XML Elves

<community>of XML and SVG Developers</community>


Open a SVG IE

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


Go Back   XML Elves > SVG Forums > SVG Questions

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Notices


Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-19-2004, 01:49 PM
LDCV
Guest
 
Posts: n/a
Default Open a SVG IE

Hi, Thanks for a question I asked.

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2004, 02:57 AM
Anonymous
Guest
 
Posts: n/a
Default Open a SVG IE

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
open, svg


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -6. The time now is 02:08 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0

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.

ink cartridges Free UK Delivery on ink cartridges such as Canon, Dell, Epson, hp & Lexmark.

1 2 3 4 5 6 7 8 9 10