PDA

View Full Version : Clearing a document


java_jedi
09-16-2002, 11:01 PM
I want to clear a document, make a clear screen, and start writing new HTML using document.write
I tried to clear the document using document.clear, but it doesn't help. Anyone know another method to clear a document?
thanks.

hairynugs6382
09-16-2002, 11:07 PM
I personaly do not know how that would be done but you can try looking here under the objects section! http://www.devguru.com/Technologies/ecmascript/quickref/javascript_intro.html

adios
09-16-2002, 11:40 PM
Well...it's document.clear() - but that's deprecated (not recommended); document.open() calls document.clear() - and document.write() calls both. You need to have something to 'write', naturally, and to be aware that using document.write() is generally an all-or-nothing affair: you .write(), .close(), and that's it, the document is finished. To dynamically alter bits and pieces, use .innerHTML or DOM methods.