G
Gustavo
I there!
I have the following problem:
I have a file named a.html that contains a iframe, a div and a
javascript function called loadFinish.
The function loadFinish will put the innerHTML of the iframe into the
innerHTML of the div. THIS WORKS FINE.
<!-- FILE A.HTML -->
<iframe style="DISPLAY:none" name="bufferClass"
onload="loadFinish('contentClass', 'bufferClass');" src="b.html">
</iframe>
<div id="contentClass"></div>
<script language=javascript>
function loadFinish(id1, id2) {
var html = document.frames['bufferClass'].document.body.innerHTML;
document.all['contentClass'].innerHTML = html;
}
</script>
<!-- EOF -->
This copies the innerHTML of the iframe into the innerHTML of the div.
The problem is in b.html. Here, I need to reload the iframe with the
src "c.html" and put it into the div.
The changes to the src of bufferClass are not taken into account when
the loadFinish function performs. It puts the innerHTML of b.html
instead of the innerHTML of c.html.
<!-- FILE B.HTML -->
<script language=javascript>
parent.bufferClass.src = "c.html";
loadFinish('contentClass', 'bufferClass');
function loadFinish(id1, id2) {
var html = document.frames['bufferClass'].document.body.innerHTML;
document.all['contentClass'].innerHTML = html;
}
</script>
<!-- EOF -->
NOTE: I cannot reload the page, in order to the iframe reload with new
scr. The only thing that can reload is the iframe.
Any ideas people?
Thanks
Gustavo
I have the following problem:
I have a file named a.html that contains a iframe, a div and a
javascript function called loadFinish.
The function loadFinish will put the innerHTML of the iframe into the
innerHTML of the div. THIS WORKS FINE.
<!-- FILE A.HTML -->
<iframe style="DISPLAY:none" name="bufferClass"
onload="loadFinish('contentClass', 'bufferClass');" src="b.html">
</iframe>
<div id="contentClass"></div>
<script language=javascript>
function loadFinish(id1, id2) {
var html = document.frames['bufferClass'].document.body.innerHTML;
document.all['contentClass'].innerHTML = html;
}
</script>
<!-- EOF -->
This copies the innerHTML of the iframe into the innerHTML of the div.
The problem is in b.html. Here, I need to reload the iframe with the
src "c.html" and put it into the div.
The changes to the src of bufferClass are not taken into account when
the loadFinish function performs. It puts the innerHTML of b.html
instead of the innerHTML of c.html.
<!-- FILE B.HTML -->
<script language=javascript>
parent.bufferClass.src = "c.html";
loadFinish('contentClass', 'bufferClass');
function loadFinish(id1, id2) {
var html = document.frames['bufferClass'].document.body.innerHTML;
document.all['contentClass'].innerHTML = html;
}
</script>
<!-- EOF -->
NOTE: I cannot reload the page, in order to the iframe reload with new
scr. The only thing that can reload is the iframe.
Any ideas people?
Thanks
Gustavo