|
-
Jul 1st, 2005, 07:04 PM
#1
Thread Starter
Hyperactive Member
[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?
Last edited by Disiance; Jul 2nd, 2005 at 10:38 AM.
"I don't want to live alone until I'm married" - M.M.R.P
-
Jul 1st, 2005, 09:44 PM
#2
Fanatic Member
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";
-
Jul 2nd, 2005, 07:57 AM
#3
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.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jul 2nd, 2005, 10:38 AM
#4
Thread Starter
Hyperactive Member
Re: [FireFox & innerHTML] or [document.write that doesn't wipe rest of page data]
 Originally Posted by ALL
try this:
HTML Code:
document.getElementById("frame").contentWindow.document.MyDIV.innerHTML="hello";
Thank you so much ALL, works perfectly.
"I don't want to live alone until I'm married" - M.M.R.P
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|