Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Feedback: irt.org FAQ Knowledge Base Q288

Feedback on:
irt.org FAQ Knowledge Base Q288

Sent by eric on June 27, 2001 at 13:28:48: - feedback #2905

Worth:
Worth reading

Length:
Just right

Technical:
Not technical enough

Comments:
"or with the use of a small script at the bottom of frame 1" should read "or with the use of a small script at the bottom of frame 2".


Sent by Johan Godfried on January 20, 2002 at 04:24:05: - feedback #3506

Worth:
Worth reading

Comments:
I had a problem with frame2 accessing formfields in frame 1 and I couldn't get any JavaScript to detect wether the form in frame 1 was fully loaded. So I solved it by creating a workaround.

In the SCRIPT section of the HEAD section of Frame 1, looks like this:
<SCRIPT Language=JavaScript>
IsLoaded = false;
[Rest of scriptsection]
</SCRIPT>

Then, in the body section, just before the </body> tag, I added the following piece:
<SCRIPT Language=JavaScript>
IsLoaded = true
</SCRIPT>

Now, in Frame 2, I accessed Frame 1 as follows:
<SCRIPT Language=JavaScript>
function Startup() {
if (parent.Frame1.IsLoaded) {
[Perform action. Frame is loaded]
} else {
window.setTimeout("Startup()",1)
}
}
Startup();
</SCRIPT>

The little script called Startup, checks to see if the variable IsLoaded is set to true, if it is, it will perform the action on Frame 1, if not, then it waits a little and calls itself again.

I hope this feedback is usefull.

Greetinx

Johan Godfried.



Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 21st December 2007. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.