Learning DHTML programming
I put up a small web application called SVG Creator, I'm developing it
as a learning exercise. The url is:
http://www3.sympatico.ca/brentritchie/. So far development is going
well, but; I am having problems getting cross browser compatability.
I use IE, Opera and Firefox as testing environments, but as soon as I
added in dynamic SVG routines, the web site stopped displaying properly
on IE and Firefox. I was hoping that someone could help a bit.
The problem started when I added the following tag:
<object data="./Content/Canvas.svg" id="Canvas" name="Canvas"
type="image/svg+xml" width="800" height="600"
IE just wouldn't load it (I tried both adobe plugin v3.02 and v6), and
Firefox just wanted to download the svg file. I heard about using an
embed tag but I want to use XHTML-Strict and keep formatting for CSS.
Does any one have any ideas?
The source is at
http://www3.sympatico.ca/brentritchi...svgcreator.zip. If you
don't feel like going through the source then maybe comment on the site
Re: Learning DHTML programming
Brent Ritchie wrote:
> The problem started when I added the following tag:
> <object data="./Content/Canvas.svg" id="Canvas" name="Canvas"
> type="image/svg+xml" width="800" height="600"
Where is onload defined as an attribute of the object element?
> IE just wouldn't load it (I tried both adobe plugin v3.02 and v6), and
> Firefox just wanted to download the svg file.
Configure you server to serve the SVG documents as image/svg+xml and I
am sure Firefox 1.5 will parse and render them. Currently you serve
application/octet-stream which is usually a fallback or indication of
some binary to download.
As for using object to embed the SVG document in an HTML document, you
need to be aware that IE/Adobe SVG viewer disable script in the SVG
document when object is used due to security holes. So iframe or embed
need to be used if you want to have script in the SVG document itself.
|All times are GMT. The time now is 09:26 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.