Hi,
 
I have a really strange problem when using svg inside the <object> tag.
 
When I don't use cocoon to serve the following page everything is fine and I get
an alert, but when cocoon serves the page the _javascript_ fails at getSVGDocument
(or getSvgDocument).
 
Here is my simple html page :
 
<html>
 
<head>
 <script>
 
  function initSvg(id) {
   var svg = document.getElementById(id);
   var svgDoc = svg.getSVGDocument();
   alert(svgDoc);
  }
 
 </script>
</head>
 
<body >
 
 <object type="image/svg+xml" id="svg1"
  data=""
  width="100%" height="100%">
 </object>
 
</body>
 
</html>
 
Here is a snippet from my sitemap :
 
   <map:match pattern="*.htm">
    <map:read src="" mime-type="text/html"/>
   </map:match>
   <map:match pattern="*.svgz">
    <map:read src="" mime-type="image/svg+xml"/>
   </map:match>
This problem does not occurr when I use the <embed> tag - but I prefer
to use <object> so that I can display a jpeg if the SVG plugin is not
installed.
 
I have tried using cocoon 2.04 and 2.1m2 with the same results.
 
Any ideas ?
 
Thanks in advance,
 
Rob Gregory

Reply via email to