Closed Thread Icon

Preserved Topic: document.clear() (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=17998" title="Pages that link to Preserved Topic: document.clear() (Page 1 of 1)" rel="nofollow" >Preserved Topic: document.clear() <span class="small">(Page 1 of 1)</span>\

 
lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 05-29-2001 13:33

hello,

what is the document.clear() supposed to do? isn't it supposed to clear all the document content?

btw, how can i get the whole HTML file content in a javascript string?
like: myvar = document.htmltext? or something?

-=l=-

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 06-01-2001 08:20

well? hope someone can help me with this one.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 06-01-2001 18:39

*looks up document.clear...*

According to JavaScript: The Definitive Guide, "The clear() method of the Document object is deprecated and should not be used. To clear a document, you should simply open a new one with Document.open()."

So, yeah, do that. Then write the content with document.write(), and then close the document with document.close() and the new content will appear.

I'm afraid there is no real way to get the entire HTML page into one string. What exactly are you trying to do? Because there's probably a different way to do it, judging from the questions you're asking.

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 06-07-2001 10:35

thanks slime!

« BackwardsOnwards »

Show Forum Drop Down Menu