473,399 Members | 4,254 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Learning DHTML programming

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

Aug 15 '06 #1
1 1279


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/
Aug 16 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: mr_burns | last post by:
hi there, i would like a book that will explain concepts of javascript and dhtml instead of, for example, ten tutorials on how to do specific things in js or dhtml. ideally a book thats can...
7
by: Andy | last post by:
Hi Just purchased "Beginning Visual Basic 2005" from amazone.com. Anyone who has experience with this book, or could recomend another beginning programming bok? /A.
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
7
by: Max | last post by:
On monday I start a semester course in Python (the alternative was Java). I was looking through the course outline and noticed the following: 1) UserDict is used. This is deprecated, right? 2)...
26
by: K.J.Williams | last post by:
Hello, A friend and I want to learn PHP but we have two totally different programming backgrounds. I have experience with procedural programming in C, and he has experience with Visual BASIC....
16
by: John Salerno | last post by:
Just something that crosses my mind every time I delve into "Learning Python" each night. Does anyone see any value in learning Python when you don't need to for school, work, or any other reason?...
10
by: Michael Reach | last post by:
Can anyone suggest a really good course in Javascript that my son can take online, starting right away? It should be for someone without much programming experience, and I mean a real course, that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.