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.
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=""
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.