[FireFox & innerHTML] or [document.write that doesn't wipe rest of page data]
Alright, I have a frame and I want it to put text into the other frame. Now, there's two ways I can do it. I can use
Code:
parent.MyFrame.document.write ("data");
which wipes the rest of the page away or I can use
[CODE]parent.MyFrame.MyDIV.innerHTML =
Code:
parent.MyFrame.MyDIV.innerHTML + 'new text<BR>';
The first is undesirable because the entire page is wiped clean to insert the new text. The second won't work in FireFox. My question: Is there anyway to keep a document.write() from deleting the rest of the page, or is their an equivilent to the innerHTML property in FF?
Re: [FireFox & innerHTML] or [document.write that doesn't wipe rest of page data]
try this:
HTML Code:
document.getElementById("frame").contentWindow.document.MyDIV.innerHTML="hello";
Re: [FireFox & innerHTML] or [document.write that doesn't wipe rest of page data]
The innerHTML property exists. outerHTML is missing. And of course you can use plain new DOM manipulation.
Re: [FireFox & innerHTML] or [document.write that doesn't wipe rest of page data]
Quote:
Originally Posted by ALL
try this:
HTML Code:
document.getElementById("frame").contentWindow.document.MyDIV.innerHTML="hello";
Thank you so much ALL, works perfectly.