Help needed to Load an SVG in my ext.net application' page

  1. #1

    Help needed to Load an SVG in my ext.net application' page

    Hi,

    I'm new to this Ext.Net. I have a requirement to load an .svg file in my page. Can any one suggest how can I achieve this using ext.net?
  2. #2
    Hi,

    How do you load SVG file without Ext.Net?
  3. #3
    I'm using html object tag for that. Right now this is loading in Chrome.. But still facing issues with IE8.
    <object id="objDiv" type="image/svg+xml">
    </object>

    And I have a function to load dynamically

    function loadVisualization(path) {
    Ext.Ajax.request({
    url: 'http://url, // a json file
    success: function (response, options) {
    try {
    window.currentVisualization = Ext.util.JSON.decode(response.responseText);
    alert(window.currentVisualization);
    } catch (e) {
    showException(e, 'parsing vis structure');
    }
    window.currentVisPath = path;
    window.currentSVGObject = document.getElementById('objDiv', true);
    window.currentSVGObject.setAttribute('type', 'image/svg+xml');
    window.currentSVGObject.setAttribute('data', 'http://serverpath' + escape(path) + ".svg");
    window.currentSVGObject.setAttribute('svgName', path);
    window.currentSVGObject.setAttribute('style', 'width:100%; height:100%');
    window.currentSVGObject.addEventListener('SVGLoad' , function () {
    removeObjects(window.currentVisPath);
    svgOnLoad(this, imagePath);
    }, false);
    },
    failure: function () { alert("Ajax request for visualization failed") }
    });
    }

    Quote Originally Posted by Vladimir View Post
    Hi,

    How do you load SVG file without Ext.Net?

Similar Threads

  1. [CLOSED] Stop treepanel to load data on page load
    By inayath in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 11, 2011, 10:17 AM
  2. how to load data to grid panel in page load
    By andylaiyongsing in forum 1.x Help
    Replies: 1
    Last Post: Apr 16, 2010, 10:27 AM
  3. Load Coolite JS only when needed
    By mj.daly in forum 1.x Help
    Replies: 6
    Last Post: Feb 11, 2010, 1:44 PM
  4. Replies: 4
    Last Post: Nov 20, 2009, 9:05 AM
  5. How do I load Grid only when needed?
    By dbassett74 in forum 1.x Help
    Replies: 2
    Last Post: Jun 05, 2009, 3:31 PM

Posting Permissions