|
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>
|
|
|
Copyright © 1996-2008 irt.org, All Rights Reserved.