simple iframe, calling with innerHTML - what am i doing wrong here?

simple iframe, calling with innerHTML - what am i doing wrong here?

Post by Ragnorack6 » Fri, 04 Mar 2005 06:50:02


...[something.htm]

<div id=work>hello</div>


...[somethingelse.htm]

<IFRAME id="thisframe" src="./something.htm"></IFRAME>

<script>
document.frames("thisframe").getElementById("work").innerHTML =
"goodbye"
</script>

Thank you
 
 
 

simple iframe, calling with innerHTML - what am i doing wrong here?

Post by Bert » Fri, 04 Mar 2005 09:29:38


< XXXX@XXXXX.COM > schreef in bericht


change to:
document.frames("thisframe").getElementById("work").body.innerHTML =

grt Bert

 
 
 

simple iframe, calling with innerHTML - what am i doing wrong here?

Post by Bert » Fri, 04 Mar 2005 09:30:58


"Bert" < XXXX@XXXXX.COM > schreef in bericht



sorry, makes nog sense...
 
 
 

simple iframe, calling with innerHTML - what am i doing wrong here?

Post by Bert » Fri, 04 Mar 2005 09:42:39


< XXXX@XXXXX.COM > schreef in bericht


document.frames("thisframe").document.getElementById("work").innerHTML =
"goodbye";

that might be better...
 
 
 

simple iframe, calling with innerHTML - what am i doing wrong here?

Post by Ragnorack6 » Fri, 04 Mar 2005 10:56:01

Hmm, tried both and still can't get it to work. I'm yanking my hair out
with this one. Nothing seems to work! Have you tested it out?
 
 
 

simple iframe, calling with innerHTML - what am i doing wrong here?

Post by Ragnorack6 » Fri, 04 Mar 2005 10:59:18

Hmm, tried both and still can't get it to work. I'm yanking my hair out

with this one. Nothing seems to work! Any ideas?
 
 
 

simple iframe, calling with innerHTML - what am i doing wrong here?

Post by Bert » Fri, 04 Mar 2005 11:06:00

here's the source I tested it with:




<html>

<script>
function test()
{

document.frames("thisframe").document.getElementById("work").innerHTML =
"goodbye";

}
</script>

<body onload = "test()">


<IFRAME id="thisframe" src="./something.htm"></IFRAME>

</body>
</html>
 
 
 

simple iframe, calling with innerHTML - what am i doing wrong here?

Post by Ragnorack6 » Fri, 04 Mar 2005 13:06:52

Interesting. Why does it error out if you remove test(); from body
onload? Anyway to make it a seperate call function, like <script>
test(); </script> somewhere else?
 
 
 

simple iframe, calling with innerHTML - what am i doing wrong here?

Post by Ragnorack6 » Fri, 04 Mar 2005 13:26:55

Thank you -- works perfectly... Have a great weekend! :)))

Sincerely --

Alex