views:

343

answers:

4

I'm building a WSS site which has to show SVG files stored on WSS. I'm trying to use <object> tag to show it and it doesn't show, however, if I use <embed> it works ok. Im'using IE8 and IE7

I've been reading and everyone tells IE prefers <Object> over <embed>, but in WSS it doesn't work this way.

To display the file I'm using a web content editor webpart with this code:

<object type="image/svg+xml" data="/samples/sample.svg"
        name="owMain" width="400" height="150">
</object>

Any clue??

A: 

Is it me or IE does not support SVG? Well, it kinda does but it is tricky and it's to draw, not to show svg files. ... If you open with FF can you see what you are expecting?


added

I made an svg draw in IE ... it's not the same, I know, but it's something that you can read and test: stackoverflow.com/questions/536676

balexandre
The thing is, this app is for a Intranet app, ant the client is very strict on its supported software.. only IE 6 or 7.. Even more: We'll facing problems because of the decision Adobe took on not supporting SVG viewer since jan 2009.
Nicolas Irisarri
I made an svg draw in IE ... it's not the same, I know, but it's something that you can read and test: http://stackoverflow.com/questions/536676
balexandre
+1  A: 

You cannot add object tags to the html content of a page in WSS. The issue is that the object tag can be used in lots of very bad ways, so it is stripped out by the underlying engine.

You have found that the content editor webpart does not suffer from the same limitations.

Nat
+1  A: 

The first step, if you haven't already, is to confirm that the HTML content in the response is as you expect (e.g. view source). If it isn't then you've found your issue. If it is, the next step might be to use a debugging proxy like Fiddler to confirm that all of the related requests are being made and handled as you expect. If they're not then you've found your issue (e.g. security). If they are then by the process of elimination you can safely conclude that either the markup or the browser is lacking.

Jason Weber
A: 

I managed to do this on IE7/8 with the following Html:

<embed width="600" height="450" id="objMapView" src="http://XXXXXXXX/file.svgz" 
 type="image/svg+xml" name="objMapView" border="1"/>

It works Ok bur requires adobe's SVG Plugin

Nicolas Irisarri