Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

Feedback on: irt.org FAQ Knowledge Base Q288, January 20, 2002 at 04:24:05:

You are here: irt.org | About | Feedback | 3506 [ previous next ]

Feedback on:
irt.org FAQ Knowledge Base Q288

Sent by
Johan Godfried on January 20, 2002 at 04:24:05:

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.


Other feedback on 'irt.org FAQ Knowledge Base Q288' - show all

©2018 Martin Webb