Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6853389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:30:24+00:00 2026-05-27T01:30:24+00:00

This is my problem…. ‘mon’ function works if i set html property directly with

  • 0

This is my problem….

‘mon’ function works if i set html property directly with svg code like this:

html: '<svg><text id="ID">Example</text></svg>

I can manage elements by ID and set an event.

But, if i recall an svg file by tag EMBED or iFRAME like this:

html: '<embed src="abc.svg">'  

the elements included in svg file are hidden!!

If i write for example

alert(Ext.get("ID"))  

with ‘ID’ refers to an Html Element included in ‘abc.svg’ file, chrome debugger says:

Uncaught TypeError: Cannot read property ‘id’ of null (from sencha-debug.js)
Resource interpreted as Document but transferred with MIME type image/svg+xml.

Can i read elements included in a svg file ?! If so, how ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:30:24+00:00Added an answer on May 27, 2026 at 1:30 am

    sure you can, the console in this sample will show “cirkel”, the type of the embed has to be set, the contents has to be valid SVG and this sample needs the defer because the loading of the SVG takes some time.
    Hope this helps
    Grtz

    <head>
      <link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all-gray.css" />
      <script type="text/javascript" src="ext/bootstrap.js"></script>
      <script type="text/javascript">
      Ext.onReady(function(){
        var win = new Ext.Window({  
          width  : 300,  
          height : 150,  
          layout : 'fit',
          html: '<embed src="test.svg" type="image/svg+xml" />'
        });
        win.show();
        var delayedTask = new Ext.util.DelayedTask().delay(400, function(){
          console.log(window.document.plugins[0].getSVGDocument().firstChild.childNodes[1].id)
        }, win);
    
      });
      </script>
    </head>
    <body>
    </body>
    </html>
    

    Here The contents of the test.svg file

    <svg xmlns="http://www.w3.org/2000/svg" version="1.1">
      <circle id="cirkel" cx="100" cy="50" r="40" stroke="black"
      stroke-width="2" fill="red"/>
    </svg>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This problem smells like there should be an answer in graph theory, but it
This problem is creeping up in many places in my code,but the general behavior
This problem has been bothering me for awhile. Occasionally I would set up an
This problem has bugged me for years, and I always feel like I'm coming
This problem is making me a bit crazy. I have something like this <h3>Feeds
This problem is a kind of closest pair between two disjoint set. Upperside picture
this problem is part of a bigger page but I've simplified the code to
this problem is killing me, here is my code import java.text.ParseException; import java.text.SimpleDateFormat; import
This problem is driving me crazy. I have the following code: 'unprotect sheet If.Range(Start).Row+1<.Range(End).Row
This problem only occurs using IE (only tested in IE 7, works fine in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.