472,807 Members | 2,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,807 software developers and data experts.

Clear a document?

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. :-(
Jul 23 '05 #1
2 7680
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.
Jul 23 '05 #2
"Alan Fiddis" <Al********@Yahoo.co.uk> wrote in message news:<31*************@individual.net>...
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'
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Rob Videtta | last post by:
Hi, Please Help! I have developed a custom JSP tag that produces Javascript to create a window and write HTML and Javascript to that window. This window displays an error message. The...
2
by: Jack Black | last post by:
Hi, all!! Trying to clear the contents of a frame (or iframe), and can't seem to find anything that works. Tried: * innerHTML * outerHTML * document.close(); (with a number of different frame...
2
by: Bill S. | last post by:
Hi, I have a form that is generated by an ASP page, and I want to write a client-side function in JavaScript to clear all the checkboxes in a form. The problem is that the number of items on...
1
by: JeeperDude | last post by:
I'm trying to display some text, wait a few seconds, clear the screen, display normal html. Thanks for the answer in advance. Kenny in Fredericksburg, Va. Ken4PSHIS@aol.com
6
by: trope | last post by:
Does anyone have the code to clear all of the elements in a select menu? I've been having trouble with this following code: for (var i=0; i< 100; i++) document.addskill.cat2.options = null; ...
1
by: laurakr | last post by:
I am trying to use a clear to get my bottom nav bar below the quote box on the right, but it isn't working. I would like the bottom edge of the quote box to "stick" to the footer nav bar but copy...
5
by: plumba | last post by:
Ok, another query.... I have a checkbox at the bottom of my form which when checked unhides a <div> block which displays the submit button. The problem I have is when the clear form button is...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.