Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Learning DHTML programming

Reply
Thread Tools

Learning DHTML programming

 
 
Brent Ritchie
Guest
Posts: n/a
 
      08-15-2006
Hello,

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"
onload="javascript:LoadCanvas()">
</object>

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
in general?

Thanks,

Brent Ritchie

 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      08-16-2006


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"
> onload="javascript:LoadCanvas()">

^^^^^^
Where is onload defined as an attribute of the object element?
<http://www.w3.org/TR/html4/struct/objects.html#edef-OBJECT>

> </object>
>
> 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.


--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[I'm learning C]: Learning to use ucontext Andrey Popp C Programming 5 01-31-2012 01:05 AM
Learning C and Learning Make/Configure/Building/Linking Hal Vaughan C Programming 7 03-21-2006 05:07 PM
e-learning, (collaborative learning environment) collinm Java 1 09-08-2005 09:52 PM
Do any DHTML books cover contemporary DHTML? Steve Javascript 1 04-09-2005 04:16 PM
dhtml/programming languages Laura Williams Javascript 9 11-25-2004 03:50 AM



Advertisments