M
miha.vitorovic
Hi all. I know this is more of a DOM question, but here it goes:
Browser == Firefox
suppose I have two frames. One has many links and is opening pages in
the other one. I would like to check if the page is finished loading.
This is the example of the "links" frame.
----
<html>
<head>
<title>Frame1</title>
<script type="text/javascript">
<!--
function loadDocument() {
content = window.open( "frame2.html", "Content" );
content.addEventListener( "load", sayDone, false );
}
function sayDone() {
alert( "done" );
}
//-->
</script>
</head>
<body>
<input type="button" value="Open frame 2" onclick="loadDocument()">
</body>
</html>
----
The problem I'm having is, that this only works the first time. If I
click on the button again, the load event is not captured. I didn't
find anything useful when searching the web. Can anybody here help?
Thanks in advance, Miha Vitorovic
Browser == Firefox
suppose I have two frames. One has many links and is opening pages in
the other one. I would like to check if the page is finished loading.
This is the example of the "links" frame.
----
<html>
<head>
<title>Frame1</title>
<script type="text/javascript">
<!--
function loadDocument() {
content = window.open( "frame2.html", "Content" );
content.addEventListener( "load", sayDone, false );
}
function sayDone() {
alert( "done" );
}
//-->
</script>
</head>
<body>
<input type="button" value="Open frame 2" onclick="loadDocument()">
</body>
</html>
----
The problem I'm having is, that this only works the first time. If I
click on the button again, the load event is not captured. I didn't
find anything useful when searching the web. Can anybody here help?
Thanks in advance, Miha Vitorovic