Reputation: 9348
I am using a frameset with 3 frames, using parent.error.document.write("hi") I wrote to one of the frames but I want to clear it from another frame. Is it possible to do the same?
Upvotes: 0
Views: 1454
Reputation: 23406
Without seeing your code I can only guess possible reasons.
You have id
s in <frame>
s instead of name
s.
You've created content to the target frame using document.write()
already, without document.close()
. In this case the document is not cleared when writing again.
Document in target frame has been loaded from different domain.
If there's nothing to repair according the list above, you can try to refer frameTwo
-document with top.window.frameTwo.document
, or top.window.frames['frameTwo'].document
.
Upvotes: 1
Reputation: 23250
Say your two frames are like so:
<frameset framespacing="0" rows="*">
<frame name="frameOne" src="frame1.html">
<frame name="frameTwo" src="frame2.html">
</frameset>
From inside frameOne you should be able to access frameTwo by:
window.parent.frameTwo.document
Upvotes: 0