views:

612

answers:

4

Hi Guys,

Does anybody know of a comprehensive library to make SVG work with IE (7 and 8 in particular)?

I wanted something Javascript which could be included in my web page and which would silently convert all my SVG to VML in a fashion similar to what excanvas does for Canvas.

+4  A: 

I think SVGWeb is the way to go, even if it is based on Flash as VML is far from being fast enough for lots of applications.

Fabien Ménager
Beaten by 8 seconds!
David Dorward
+6  A: 

Google's SVG Web does this. According to the project website:

SVG Web is a JavaScript library which provides SVG support on many browsers, including Internet Explorer, Firefox, and Safari. Using the library plus native SVG support you can instantly target ~95% of the existing installed web base.

Whilst it's described as a JavaScript library it also requires Flash 9+. This isn't usually a problem, but if you're in a corporate environment with old Flash or no Flash on the workstations it's not going to work.

Also, it is still in Alpha which could be a problem, depending on what your project is.

Dave Webb
-1 (philosophically, not literally) for Flash-based solution. Flash is a proprietary, vendor-chokehold technology.
T.J. Crowder
So is IE. Its only fitting for Flash to be the solution to *open* IE.
voyager
This is still in alpha stages.
John Gietzen
Flash based, yes, but the web page source code is still good old open SVG so it's a good way to go since you can't expect IE from moving its ass before 5 years.
e-satis
+1  A: 

Adobe provides scripts to automatically detect, install, and redirect you back to your original site:

http://support.adobe.com/devsup/devsup.nsf/docs/51780.htm

http://www.adobe.com/svg/workflow/autoinstall.html

I have been using this fairly successfully on my site.

John Gietzen
Adobe's `svg` implementation is no longer being developed.
voyager
In fact, I think they quit developing it long before IE 8 was released. If it works with IE 8, it is just luck.
T.E.D.
It does work in IE8. I have tested it. They are still supporting it as a legacy download.
John Gietzen
I thought I had read it does NOT work in IE8 but obviously you have it doing so. I would be wary of any future use, though. Keep in mind as others have said that Adobe stopped development work on this years ago and only offer that download link with zero support. It could disappear tomorrow.
Rob
+5  A: 

The Raphaël—JavaScript Library can help you out there.

Raphaël uses the SVG W3C Recommendation and VML as a base for creating graphics and supports Firefox 3.0+, Safari 3.0+, Opera 9.5+ and Internet Explorer 6.0+.

EDIT:

There are two more js-libraries which use vml to render svgs in IE:

  • Ample SDK (where it should be possible to easily integrate existing svg files)
  • DojoX GFX from the Dojo Toolkit
räph
Can you open a svg with this library?
Milhous
Not really. of couse only a subset of svg/vml is supported, so you cannot really take an svg file and "open" it in raphael. But the path synatax is the same, so basically you have to copy all the paths from svg into your javascript code (or write something which does this automatically for you). I think most people just copy their (simplified) paths from inkscape or other editors into the raphael code
räph