473,396 Members | 1,875 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,396 software developers and data experts.

Scripting over document borders / Alert Box

Hello NG,

i'm wondering about a very strange behaviour in a javascript: In my
web application, there are a few SVGs (Adobe SVGViewer 3.0) embedded
by OBJECT-tag in an HTML-File. By starting a (globally known)
JS-Function in the "Menu"-SVG, it creates a new SVG-Node-Tree and
appends it to a anchor-Node in an "Display"-SVG. This means, a
function called in one document creates SVG-Eelements in another
document. This works fine, if a simple JS-alert is included at the
beginning of the SVG-creation-process. If not, it doesn't work - no
SVG is created. IMHO, i can exclude a runtime error, for that i
analyzed it quite intensive. In my opinion, the problem could deal
with restrictions on scripting over document borders. Nevertheless, i
don't understand it. Does anybody have experience with that kind of
behaviour? Does an alert have such influence on something like a
"focus" on a document?

Help would be appreciated,

Oliver
Jul 23 '05 #1
2 1275
Oliver Knorr wrote:
Hello NG,

i'm wondering about a very strange behaviour in a javascript: In my
web application, there are a few SVGs (Adobe SVGViewer 3.0) embedded
by OBJECT-tag in an HTML-File. By starting a (globally known)
JS-Function in the "Menu"-SVG, it creates a new SVG-Node-Tree and
appends it to a anchor-Node in an "Display"-SVG. This means, a
function called in one document creates SVG-Eelements in another
document. This works fine, if a simple JS-alert is included at the
beginning of the SVG-creation-process. If not, it doesn't work - no
SVG is created. IMHO, i can exclude a runtime error, for that i
analyzed it quite intensive. In my opinion, the problem could deal
with restrictions on scripting over document borders. Nevertheless, i
don't understand it. Does anybody have experience with that kind of
behaviour? Does an alert have such influence on something like a
"focus" on a document?


On a first look, it seems that it might have something to do with loading
files. If you load your SVG files, it is quite possible that it isn't yet
loaded when JS tries to access the object; the alert creates necessary delay
(before you click the button). You should include some test for load status,
and use the objects only after they are completely loaded.

Berislav

--
If the Internet is a Marx Brothers movie, and Web, e-mail, and IRC are
Groucho, Chico, and Harpo, then Usenet is Zeppo.
Jul 23 '05 #2
Hello Berislav, thank you for your reply.

The concerned files are already loaded and t5he SVG is created
dynamically. For a better imagination: after clickingh on a Button in
one (menu-)document, SVG-Nodes are created in another, empty
(toolbar-)document. Can you figure it out?
So, there's no runtime aspect in this problem.

Thanks, Oliver
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #3

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

Similar topics

3
by: Shabam | last post by:
I have an application that allows users to input certain html tags via a markup code (like "http://www.sfd.com/image.gif"). The application then translates that into real html for output. I've...
3
by: flosi | last post by:
I'm a greenhorn in SVG and javascripting but I'm learning by doing. So, here my current problem question : I have a svg document embedded in another svg document. I whant, through functions in...
2
by: kw | last post by:
TextBox t=new TextBox(); Controls.Add(t); t.ID=t.ClientID; //reads: "_MyControl1__ctl16" And even in OnPreRender, I examine the Controls collection and verify that the ID of the TextBox is...
3
by: Vongza | last post by:
<html> <head> <title>Cross Frame Reference</title> <script language="javascript"> function showThisTitle() { alert(document.title); } function showAnotherTitle() { try {...
1
by: jdeighan | last post by:
The following results in a second row, with a cell containing 'xxx', being added to the table on the web page, but only in Firefox, not in IE 6. In IE 6, the JavaScript function runs - in fact, the...
3
by: aspmonger | last post by:
Hello, I really believe that IE 6 has a new (intentional?) bug that severely limits the capability of dhtml and cross domain scripting. Yesterday, I read an interesting article about the subject and...
6
by: avh | last post by:
Hi, I'have been looking for a simple scripting (interpreted) language to be run within my ASP.NET pages.Syntax is of minor importance. Although I find many options, all of these seem to first...
4
Death Slaught
by: Death Slaught | last post by:
Would it be considered bad scripting if you wrote a script in javascript but used html for just regular text? or does it matter? heres an example. <html> <script type="text/javascript"> var...
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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...
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.