Feedback on: irt.org FAQ Knowledge Base Q288
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".
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.