Loading ...
Sorry, an error occurred while loading the content.

Cant use getSVGDocument() in IE

Expand Messages
  • alefielm
    This is the part of the script I use with SVG, no problem in FF or Chrome, the shape chaco changes its color to white, in IE it goes until alert( SVG
    Message 1 of 1 , Dec 5, 2012
    • 0 Attachment
      This is the part of the script I use with SVG, no problem in FF or
      Chrome, the shape "chaco" changes its color to white, in IE it goes
      until alert("SVG contentDocument 2!"); when I use the developer tools
      and execute mySVG.getSVGDocument(); it throws : "Object doesn't support
      this property or method", no errors in previous code.
      Any idea on what I can try to solve this?
      thank you!

      <script src="libs/svgweb/svg.js"></script>

      <!--[if !IE]>-->
      <object data="ArgCABAyNombres1.svg" type="image/svg+xml"
      width="630" height="1080" id="mySVGObject" > <!--<![endif]-->
      <!--[if lt IE 9]>
      <object src="ArgCABAyNombres1.svg" classid="image/svg+xml"
      width="630" height="1080" id="mySVGObject" > <![endif]-->
      <!--[if gte IE 9]>
      <object data="ArgCABAyNombres1.svg" type="image/svg+xml"
      width="630" height="1080" id="mySVGObject" > <![endif]-->
      </object>
      <script>
      var mySVG = document.getElementById("mySVGObject");
      var svgDoc;

      function carga() {

      alert("SVG contentDocument 2!");
      var SD=mySVG.getSVGDocument();
      alert("SVG contentDocument Loaded!");
      E=SD.getElementById('Chaco');
      E.style.fill='#ffffff';
      alert("SVG contentDocument Loaded!");
      };

      window.onsvgload = function() {
      carga();
      }

      </script>
    Your message has been successfully submitted and would be delivered to recipients shortly.