Clear a document?

Discussion in 'Javascript' started by Alan Fiddis, Dec 5, 2004.

  1. Alan Fiddis

    Alan Fiddis Guest

    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. :-(
     
    Alan Fiddis, Dec 5, 2004
    #1
    1. Advertising

  2. Alan Fiddis

    Evertjan. Guest

    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.
     
    Evertjan., Dec 5, 2004
    #2
    1. Advertising

  3. Alan Fiddis

    RobB Guest

    "Alan Fiddis" <> wrote in message news:<>...
    > 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'
     
    RobB, Dec 6, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve Carrow
    Replies:
    0
    Views:
    570
    Steve Carrow
    Jul 28, 2003
  2. Wendy S
    Replies:
    1
    Views:
    6,458
    Darren Davison
    Aug 5, 2003
  3. David

    Response.Clear() doesn't clear

    David, Jan 31, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    1,117
    Mark Fitzpatrick
    Jan 31, 2008
  4. InvalidLastName

    Unrecognized element 'add' after <clear></clear>

    InvalidLastName, Feb 26, 2007, in forum: ASP .Net Web Services
    Replies:
    3
    Views:
    1,067
    Steven Cheng[MSFT]
    Mar 6, 2007
  5. max
    Replies:
    3
    Views:
    140
    Fabian Pilkowski
    May 28, 2005
Loading...

Share This Page