SVG image won't show in Firefox

54 views
Skip to first unread message

David

unread,
Sep 16, 2008, 12:25:10 PM9/16/08
to ASCIIMath
All,

We worried a bit about mime types, so we tweaked httpd.conf on our
server to handle:

image/svg+xml svg
image/svg+xml svgz

I can open this file in safari:

http://msemac.redwoods.edu/~darnold/math50C/matlab/lines/index.xhtml

And the image shows.

If I open the same file in Firefox, the image does not show:

http://msemac.redwoods.edu/~darnold/math50C/matlab/lines/index.xhtml

As a test in firefox, we try:

http://msemac.redwoods.edu/~darnold/math50C/matlab/lines/lineplane1.svg

And it serves up the svg file just fine.

Any thoughts as to why the image is not showing up in my asciimathml
document above?

D.

Paulo Soares

unread,
Sep 16, 2008, 6:22:23 PM9/16/08
to ASCIIMath
David,

since you are doing this

<img src="lineplane1.svg" alt="A plot of x versus t." width="300"
height="300" />

to include the svg image, I would say that the Firefox problem is not
related to the ASCIIMathML script.

Don't take my word for it but I believe that Firefox does not support
svg images as source in the IMG tag.
Try the following 3 solutions to see if any of them works with several
browsers:

<object type="image/svg+xml" data="lineplane1.svg" width="300"
height="300">SVG</object>

<embed src="lineplane1.svg" width="300" height="300"
pluginspage="http://www.adobe.com/svg/viewer/install/" />

<object data="lineplane1.svg" type="image/svg+xml"
width="400" height="300">
<embed src="lineplane1.svg" type="image/svg+xml"
width="400" height="300" />
</object>

--
Paulo Soares

Marc Grober

unread,
Sep 16, 2008, 6:28:44 PM9/16/08
to asci...@googlegroups.com
I had tried to open the xhtml in ieTAB with MathPlayer and
Adobe SVG viewer and while the math displayed the svg viewer
failed to show the svg....

> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google Groups "ASCIIMath" group.
> To post to this group, send email to asci...@googlegroups.com
> To unsubscribe from this group, send email to asciimath+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/asciimath?hl=en
> -~----------~----~----~----~------~----~------~--~---
>

David

unread,
Sep 17, 2008, 2:05:49 AM9/17/08
to ASCIIMath
Thanks. This one worked:

<object type="image/svg+xml" data="lineplane1.svg" width="300"
height="300">SVG</object>

See:

http://msemac.redwoods.edu/~darnold/math50c/matlab/lines/index.xhtml

This is an unfinished activity.

D.

mauno

unread,
Sep 17, 2008, 10:22:23 AM9/17/08
to ASCIIMath
Hi David,
Firefox is ok but to make it work with IE & ASV you need to add param
tags:

<OBJECT type=image/svg+xml height=300 width=300 data=lineplane1.svg>
<param name="src" value="lineplane1.svg">
SVG</OBJECT></P>

and obviously the version you are using there has some other problems
with object tags and Adobe SVG Viewer.

When Marc told about this I tested a copy of that page with old
version 1.4.7 and fallback version ASCIIMathMLwFallback2.js and they
worked ok.

One more note - on my test Debian test server with moodle I noticed
that d.svg is not always found if dsvglocation = ""; and I had to set
the path...

By the way Thank you for these wonderful scripts!

Mauno
> > > D.- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages