Forum Moderators: open

Message Too Old, No Replies

SVG support- IE and Mozilla

         

Hitesh

6:34 pm on Aug 29, 2003 (gmt 0)

10+ Year Member



I was playing around with .SVG files. I found out that .svg files for IE don't work for Mozilla whereas .svg files for Mozilla don't work for IE. What gives? I am trying to figure out what changes to the sample code provided below which was taken from [croczilla.com...]

The code is:

<?xml version="1.0"?>

<svg xmlns="http://www.w3.org/2000/svg">
<g transform="scale(0.5)">
<polygon style="fill:red; stroke:blue; stroke-width:10"
points="350, 75 379,161 469,161 397,215
423,301 350,250 277,301 303,215
231,161 321,161" />
<polygon style="fill:lime; stroke:blue; stroke-width:10"
points="850,75 958,137.5 958,262.5
850,325 742,262.6 742,137.5"/>
</g>
</svg>

How do I change the code so that it can work on IE without Mozilla being affected by those changes?

hartlandcat

7:37 pm on Aug 29, 2003 (gmt 0)

10+ Year Member



I don't believe that any browser really supports SVG files and they are not something that you'd really want to use.

Hitesh

7:58 pm on Aug 29, 2003 (gmt 0)

10+ Year Member



Unfortunately, my boss doesn't think so. SVG is necessary for the application I am developing.

Mozilla has its own plugin and IE can use the Adobe SVG Viewer plugin. The problem is that they require different syntax of codes. I want to know what kind of differences and the specs of those differences.

bcolflesh

8:22 pm on Aug 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't believe that any browser really supports SVG files

Well - they don't - the same way no browser supports Flash, JAVA, etc - you need a plugin, example:

adobe.com/svg/viewer/install/main.html

You can learn about SVG here:

w3.org/Graphics/SVG/Overview.htm8

Hester

10:40 pm on Aug 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Michael Pick has a good article on this:

[mikepick.com ]

killroy

12:28 am on Aug 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just to confirm, my MOzilla only shows a raw XML tree.

So you "must" make the plugin available if you use SVG on a website today.

Just like flash at the beginning (and still, really)

SN

killroy

12:29 am on Aug 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Also, have yo uconsidered CSS border magic and DHTML/JS? You can do some amazign poligonal work. And if you write a neat API it ought to be simple too.

SN

Hitesh

3:07 pm on Sep 2, 2003 (gmt 0)

10+ Year Member



After doing a lot of testing and debugging, I was able to get a .svg file to work on both browsers. However the next challenge is daunting.

My team uses the tag <embed> to include the .svg file within the browser. It works for IE but not for Mozilla because the SVG viewer is not supported by Mozilla. Now I have to find a way to include the .svg file within the HTML file without having to resort to writing two separate files for IE and Mozilla. I cannot copy the contents in the .svg file and paste it in the HTML file because it won't work with IE because IE does not have SVG capabilities built in yet and Mozilla does have some degree of SVG capabilities built in.

Does anybody have any idea?

BjarneDM

6:14 pm on Sep 3, 2003 (gmt 0)

10+ Year Member



Mozilla has versions for most systems with svg support built in. Text in svg is still on the drawing board, but the basic shapes are mostly working:
[mozilla.org...]

I'm on a Mac, and the Adobe svg plugin is working perfectly with Mozilla since 1.4 here - including text.

Hitesh

11:29 pm on Sep 3, 2003 (gmt 0)

10+ Year Member



Wait a minute. Are you telling me that on Mac, the plugin works for Mozilla 1.4 and higher?

If so, does it work on Windows as well? because it doesn't work on Mozilla 1.5b on Windows. Please tell me. It is very important.