Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Clear a document?

Reply
Thread Tools

Clear a document?

 
 
Alan Fiddis
Guest
Posts: n/a
 
      12-05-2004
Just a quick question folks - is it possible
to clear a document, frame or iframe
of its entire contents? I know there's
document.clear(), but it doesn't seem to
do anything.


 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      12-05-2004
Alan Fiddis wrote on 05 dec 2004 in comp.lang.javascript:

> Just a quick question folks - is it possible
> to clear a document, frame or iframe
> of its entire contents? I know there's
> document.clear(), but it doesn't seem to
> do anything.


Do a document.write('empty, haha!') after the page is displayed.
You will lose even all javascript after that.
 
Reply With Quote
 
 
 
 
RobB
Guest
Posts: n/a
 
      12-06-2004
"Alan Fiddis" <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> Just a quick question folks - is it possible
> to clear a document, frame or iframe
> of its entire contents? I know there's
> document.clear(), but it doesn't seem to
> do anything.


[windowRef/frameRef].location = 'about:blank'
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox - Clear History? Paull Firefox 7 08-24-2012 04:49 PM
Response.Clear() doesn't clear David ASP .Net 2 01-31-2008 08:32 PM
Unrecognized element 'add' after <clear></clear> InvalidLastName ASP .Net Web Services 3 03-06-2007 03:07 AM
How Do I Clear search items? Wabby Wabusha Firefox 1 10-26-2004 08:36 PM



Advertisments