Click to See Complete Forum and Search --> : clearing all info in a frame


drgnfli4
05-27-2003, 01:39 PM
I am designing a web page with two frames (top and bottom) I need a button in the top frame to clear all the information in the bottom frame. OR...I need to clear the info in the bottom frame when a new button writes to the bottom frame.

Mr J
05-27-2003, 02:13 PM
You could load a page into the bottom frame with something like this in it.


<div id="display"></div>


When you write to the bottom frame use innerHTML to put your contents into display and then you will be able to clear it with

parent.bottomframe.document.display.innerHTML=""

Jona
05-27-2003, 02:45 PM
You can also just use this:


parent.bottomframe.document.body.innerHTML="";

drgnfli4
05-28-2003, 01:30 AM
Thank you both SO much. I inserted the code you suggested and it works perfectly now.

Jona
05-28-2003, 09:37 AM
Jona