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

Q1683 Is there any way for a parent window to check if a child window has fully loaded?

irt.org | Knowledge Base | JavaScript | Window | Q1683 [ previous next ]

Q1683 Is there any way for a parent window to check if a child window has fully loaded?

In Internet Explorer 4+ use readyState:

<script language="JavaScript"><!--
function checkPage() {
  if (windowReference.document.readyState == 'complete') {
    alert('Done')
    return;
  }
  setTimeout('checkPage()',100);
}

var windowReference = window.open('popup.htm','WindowName');

setTimeout('checkPage()',100);
//--></script>

For Netscape Navigator you could create your own readyState from within the popup.htm window, which complements the above:

<html>

<head>
<script language="JavaScript"><!--
document.readyState = 'not complete';
//--></script>
</head>

<body onLoad="document.readyState = 'complete'">
...
</body>

</head>

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.