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

Q288 How can I detect with frame 1 if frame 2 is completely loaded?

You are here: irt.org | FAQ | JavaScript | Frame | Q288 [ previous next ]

Difficult.

Its easier if frame 2 notifies frame 1 when its finished loading, either using the onLoad event handler:

<BODY onLoad="parent.frame1.loaded()">

or with the use of a small script at the bottom of frame 1:

....
<SCRIPT LANGUAGE="JavaScript"><!--
parent.frame1.loaded();
</SCRIPT>
</BODY>
</HTML>

If you cannot alter the contents of frame 2, because it is not your document, then you could use another frameset in frame 2:

<FRAMESET ROWS="100%,*" onLoad="parent.frame1.loaded()">
<FRAME SRC="pagetoload.html">
<FRAME SRC="blank.html">
</FRAMESET>

This then uses the framesets onLoad event handler to notify frame 1 that frame 2 has loaded.

Feedback on 'Q288 How can I detect with frame 1 if frame 2 is completely loaded?'

©2018 Martin Webb