473,760 Members | 10,633 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Strange behaviour of IE using SVG (<object ... >

Hi,

it might be a simple solution but I do not see it. The problem is that
I have the following file stored on my local harddrive. All references
are URL to a remote computer. It is working, i.e. the code is not
throwing an error (btw the field should link to other pages by
clicking them).

The strange behavior is, that I copy the file to the remote computer
and execute it by typing http://www.smartframe.de/dumm.html (everybody
can try and check that it is an exact copy of the code below).
Internet explorer throws an error (Object expected) where I ask for
the getSVGDocument.

Witihn IE (6.0.28, latest SVG Plugin) I enabled the execution of JS
over domains.

Please help because I have no idea anymore but assume that it is a
simple solution. It is driving me nuts.

Thanks
Torsten

----------------------------------------------------------------------------
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet " type="text/css"
href="http://www.smartframe. de/static_content/css/treiners.css">
<script src="http://www.smartframe. de/applets/smartbars/SmartBar.js"
type="text/javascript"></script>

</head>
<body onload="initial izefct()">
<script xmlns:smartfram e="http://www.smartframe. de/xsl"
xmlns:cinclude= "http://apache.org/cocoon/include/1.0"
xmlns:xsp="http ://apache.org/xsp" type="text/ecmascript">fun ction
initializefct()
{
initialize_obje ct127();
} </script>
<!-- other html code -->

<script type="text/ecmascript">
function jump_to_uri(tar get) {
document.locati on.href(target) ; }
function initialize_obje ct127()
{
var obj = document.object 127.getSVGDocum ent();
obj.getElementB yId("BUTTON_MS_ G").setAttribut e("onclick","ju mp_to_uri('http ://www.smartframe. de:8080/cocoon/smartframe/main.xsp?identi fier=treiners_2 002-11-05T15:04_01:00' )");

obj.getElementB yId("BUTTON_PRO D_LOG_G").setAt tribute("onclic k","jump_to_uri ('http://www.smartframe. de:8080/cocoon/smartframe/main.xsp?identi fier=treiners_2 002-11-05T15:01_01:00' )");
}
</script>

<object type="image/svg+xml"
data="http://www.smartframe. de/lomobjects/me/vorms/tp3/media/svg/treiners_2003-02-05T180003_0100. svg"
width="600" name="object127 " height="300"> </object>
</body>
</html>
Jul 20 '05 #1
4 6067
On 30 Aug 2003 16:47:15 -0700, t.*******@tu-bs.de (Torsten Reiners)
wrote:
Witihn IE (6.0.28, latest SVG Plugin) I enabled the execution of JS
over domains.


Object is broken it accesses the file from the cache, not the remote
site, so you fall into cross domain scripting problems. Object also
doesn't specify what should happen with links executed in the object
(it's supposedly a replacement for both embed and IFRAME yet they have
different behaviour, and neither is defined in the spec, a severe
problem with OBJECT)

IFRAME is the appropriate way to go, then you can access the svg
document with

iFramename.docu ment.embeds[0].svgDocument

It's IE specific still of course, but then if you gave a toss about
other browser/viewer combinations you wouldn't be doing the
browser-doc communication.

Jim.
--
comp.lang.javas cript FAQ - http://jibbering.com/faq/

Jul 20 '05 #2
Thank for the quick reply. Sounds good but might cause other problems
(which are not necessarily applicable within this group, but ...).

ji*@jibbering.c om (Jim Ley) wrote in message news:<3f******* *********@news. cis.dfn.de>...
On 30 Aug 2003 16:47:15 -0700, t.*******@tu-bs.de (Torsten Reiners)
wrote:
Witihn IE (6.0.28, latest SVG Plugin) I enabled the execution of JS
over domains.
Object is broken it accesses the file from the cache, not the remote
site, so you fall into cross domain scripting problems. Object also
doesn't specify what should happen with links executed in the object
(it's supposedly a replacement for both embed and IFRAME yet they have
different behaviour, and neither is defined in the spec, a severe
problem with OBJECT)

IFRAME is the appropriate way to go, then you can access the svg
document with

iFramename.docu ment.embeds[0].svgDocument


Using IFRAME requires a webpages and a further embed. My problem is
that these pages are genereated and, therefore, I habe a main webpage
with the IFRAME but can not supply a further page with a complete
web-page-structure and further embeds. For IE, it should be okay to
directly reference the svg-gfx within the src-attribute but (compared
to a direct call from local harddisk-drive, I get the following
message

----

Das Verwenden von Standard-Namespacedeklar ationsattribute n wird in DTD
nicht unterstützt. Fehler beim Bearbeiten der Ressource
'http://www.smartframe. de/lomobjects/me/vorms/tp3/media/svg/treiners_2003-02-05T180003_0100. svg'.
Zeile 6, Position 6

<svg>

(engl: The Usage od StandardNamespa cedeclarationat tributes is not
supported in the DTD. Error processing the resource http:.... Line 6
pos 6.

--

Probalby should check the groups for help with this error.

Or is there another solution to my orignal problem.

Thanks
Torsten

It's IE specific still of course, but then if you gave a toss about
other browser/viewer combinations you wouldn't be doing the
browser-doc communication.

Jim.

Jul 20 '05 #3
On 31 Aug 2003 03:45:56 -07
IFRAME is the appropriate way to go, then you can access the svg
document with

iFramename.docu ment.embeds[0].svgDocument

Using IFRAME requires a webpages and a further embed.


No it doesn't

<object data="foo.svg">
and
<iframe src="foo.svg">

are the same, no extra documents needed.
For IE, it should be okay to
directly reference the svg-gfx within the src-attribute but (compared
to a direct call from local harddisk-drive
For any UA, remember OBJECT is supposedly just a replacement for
IFRAME.
Probalby should check the groups for help with this error.


You're not sending an SVG mime-type, and IE is treating it as an XML
document, you need to make sure your server is sending image/svg+xml

Jim.
--
comp.lang.javas cript FAQ - http://jibbering.com/faq/

Jul 20 '05 #4
Jim Ley wrote:
Sorry, you are of course correct, a mistake of mine, window is
directly accessible, document isn't, so to get to the document you
need:

iFramename.doc ument.embeds[0].window.svgDocu ment


Thanks for the hint, it works.

I used the window object erlier in the "embed element" context for
setting values for variables in embedded SVG documents:
document.embeds[...].window.variabl e=value;

cu, Thomas
--
SVG - Learning By Coding
<http://www.datenverdra hten.de/svglbc/>
Jul 20 '05 #5

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

Similar topics

2
10568
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script type="text/javascript"> <!]> </script> <script type="text/javascript"
6
2801
by: Christopher Benson-Manica | last post by:
(I posted this as a reply to my thread about iframes, but I think it may get mostly ignored there.) http://ataru.gomen.org/files/test.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>&lt;object&gt; test</title>
4
25413
by: KC | last post by:
Could some one explain to me the casting rules for sending generic lists, ex. List<Person>, to a function that accepts List<object>? I cannot get the following easy-cheesy app to work. I get the following error: Argument '1': cannot convert from 'GenericsPOC.ArticleCollection' to 'System.Collections.Generic.IList<object>' I tried casting specifically to IList<object> but then I get a runtime error: Unable to cast object of type...
1
1648
by: easy.lin | last post by:
.... <object id="10">door</object> .... I try to write this in clipse XSD editor <element name="object" type="string"> <attribute name="id" type="int"></attribute> </element> but get wrong message....
4
12045
by: colson | last post by:
Hi, If I have a class A, and a List<List<object>> containing instances of A. How do I explicitly cast List<List<object>> as List<List<A>>?
3
3381
by: ajay2552 | last post by:
Hi, I have a query. All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it? One method is to use &lt, &gt ,&ltCompany&gt to display '<', '>' and '<Company>' respectively. But is there any freeware code available which could implement the above functionality without having to use &gt,&lt and such stuff???
9
6998
by: Stephan Steiner | last post by:
Hi I seem to have a bit of trouble understanding one bit of how generics work: In C#, every class automatically derives from object, and inherits a bunch of properties (i.e. ToString()). Thus, (MyClass is object) should always evaluate as true. However, if I have a method with the following signature:
4
8614
by: Alan Silver | last post by:
Hello, I have an <objecttag that is used to display a Flash file. I would like the whole Flash file to be a link. The obvious thought would be to do this... <a href="http://www.url.com"><object blah....> </object></a> ....but this doesn't work.
0
9521
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9945
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8768
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7324
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5214
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5361
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3863
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.