473,396 Members | 1,847 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.

Timing problem between frames

Don
From within the "main" frame, using JS, I'm trying to copy a couple variables and arrays from the
"header" frame into the "main" frame. I've incorporated a couple "alert" statements to test the
resulting data, and find that sometimes it's good and sometimes it's "undefined". I'm thinking this
is a timing issue between the time the variables and arrays are resolved in the "header" frame, and
the time they are referenced in the "main" frame. There is no human intervention involved in either
frames, just the browsers load and execute times. How does one deal with this issue? Maybe, insert
a delay before the "main" frame is loaded or executed?

Thanks for any help.
Don

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Jul 23 '05 #1
2 1128
"Don" <no@adr.com> skrev i meddelandet
news:ap********************************@4ax.com...
From within the "main" frame, using JS, I'm trying to copy a couple variables and arrays from the "header" frame into the "main" frame. I've incorporated a couple "alert" statements to test the resulting data, and find that sometimes it's good and sometimes it's "undefined". I'm thinking this is a timing issue between the time the variables and arrays are resolved in the "header" frame, and the time they are referenced in the "main" frame. There is no human intervention involved in either frames, just the browsers load and execute times. How does one deal with this issue? Maybe, insert a delay before the "main" frame is loaded or executed?

Thanks for any help.
Don


You mean, the main frame attempts to access stuff in the header frame before
the header frame has finished loading?

When the header frame finishes loading, you could have it set a flag
variable in the main frame. When the flag is set, you know it should be OK
to access stuff in the header frame. (You'll also need to check so that you
don't attempt to set the flag before the main frame has finished loading).

--
Joakim Braun
Jul 23 '05 #2
Don
On Sun, 20 Feb 2005 10:37:00 +0100, "Joakim Braun" <jo**********@jfbraun.removethis.com> wrote:
"Don" <no@adr.com> skrev i meddelandet
news:ap********************************@4ax.com.. .
From within the "main" frame, using JS, I'm trying to copy a couple

variables and arrays from the
"header" frame into the "main" frame. I've incorporated a couple "alert"

statements to test the
resulting data, and find that sometimes it's good and sometimes it's

"undefined". I'm thinking this
is a timing issue between the time the variables and arrays are resolved

in the "header" frame, and
the time they are referenced in the "main" frame. There is no human

intervention involved in either
frames, just the browsers load and execute times. How does one deal with

this issue? Maybe, insert
a delay before the "main" frame is loaded or executed?

Thanks for any help.
Don


You mean, the main frame attempts to access stuff in the header frame before
the header frame has finished loading?

When the header frame finishes loading, you could have it set a flag
variable in the main frame. When the flag is set, you know it should be OK
to access stuff in the header frame. (You'll also need to check so that you
don't attempt to set the flag before the main frame has finished loading).

Hi Joakim,

Thanks for your response. I tried what you recommended, but when I test the flag I get an
"undefined" error msg if the header frame isn't loaded and startup code executed, which of course I
don't want displayed to the client. So, I was thinking of trying to setup another almost unvisible
(only 1 pixel, borderless) frame that will maintain the interlock variable. That, combined with a
preferred frame load order, as indicated in the <frameset>, might take care of the problem. That
should get me away from the "undefined" problem. I'll give that a try later today.

Thanks for your help.
Don

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Jul 23 '05 #3

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

Similar topics

5
by: Leon | last post by:
Hi, Could you give me some suggestions or ideas for the loading speed difference between using one single frame for a web page and not using frame for this page? Thank you very much.
2
by: ad | last post by:
What is the difference between iframe and frame? What is the situation to use iframe ?
12
by: scsharma | last post by:
Hi, I am working on creating a webapplication and my design calls for creating main webform which will have menu bar on left hand side and a IFrame which will contain all the forms that are shown...
1
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I communicate between frames in a web browser?...
1
by: Mark London | last post by:
Can I pass $_SESSION variables between frames? Some web pages claim it is possible, but I tried setting $_SESSION in the parent frame, but the other frames didn't see it set. I'm using...
0
by: CCG | last post by:
A have a web app in vb.net & asp.net. The page has 3 frames. a left frame shows options and never changes. The top right frame has paramter screen or a report. The bottom horizontal frame has ...
15
by: Jay | last post by:
I have a multi threaded VB.NET application (4 threads) that I use to send text messages to many, many employees via system.timer at a 5 second interval. Basically, I look in a SQL table (queue) to...
5
by: =?Utf-8?B?dWxpbGxpbGxpYQ==?= | last post by:
I've had two issues plaguing me for 4 months now and I haven't gotten anywhere. I'm into making 2D games and these things are essential to games. These are my issues: 1. I need timing precise...
0
by: Daniel Fetchinson | last post by:
On 4/15/08, Daniel Fetchinson <fetchinson@googlemail.comwrote: BTW, using the following ###################################################################### # CODE TO TEST BOTH...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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...

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.