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

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

irt.org | Knowledge Base | JavaScript | Frame | Q288 [ previous next ]

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

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?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.