By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,806 Members | 1,380 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,806 IT Pros & Developers. It's quick & easy.

SVG is not displaying in Chrome,in IE9 and above its working fine

P: 1
I am using
<embed height="99%" width="100%" src=""abc.svg" type="image/svg+xml" />
in my JSP creates a XML at run time and use XSTL code to superimpose the values of XML(fetched from DB) into static SVG.I am not creating any new element in SVG.I am only adding the atrributes to existing elements.

this code is working fine in IE9 and above.In Chrome it allocates a empty space(No SVG) for frame in window.When I right click on frame and view its source, the code of SVG file is present.So why SVG file do not display in Chrome.
Note- I am not using SVG Adobe plugin.

If I copy the code and create a new SVG and replace the code
<embed height="99%" width="100%" src="static.svg" type="image/svg+xml" />
then its working fine.
I cant use static SVG.I want to superimpose XML data on it.
Please give your suggestion why SVG is not displaying in Chrome
Sep 2 '13 #1
Share this Question
Share on Google+
1 Reply

P: 185
I guess your problem is the URI to the image. Look closely, you are using double quotes in the URI which makes URI invalid.
You are using (src=""abc.svg" ). This will be understood as src="". Meaning, the parameter is not passed to your servlet/action.

You may use a URI like this
src='"abc.svg"' to make it work.

Good luck.
Sep 2 '13 #2

Post your reply

Sign in to post your reply or Sign up for a free account.