RichardG
01-29-2011, 06:42 PM
I'm trying to change the content of an element from withing an iframe.
If I use this:
$('body').replaceWith("hi");
then the content of the iframe is replaced correctly.
However when I try to access the parent document it doesn't work. I've been using this code:
$('body', window.parent.document).replaceWith("hi");
What is the correct way to do this? I've tried many tutorials online but nothing seems to be working.
If I use this:
$('body').replaceWith("hi");
then the content of the iframe is replaced correctly.
However when I try to access the parent document it doesn't work. I've been using this code:
$('body', window.parent.document).replaceWith("hi");
What is the correct way to do this? I've tried many tutorials online but nothing seems to be working.