Networking | Hardware | Software | Multimedia | System | Unix&Linux | MBA

Home>>Hardware>>Anyone knows to clear the contents of the window !!! in javascript

Anyone knows to clear the contents of the window !!! in javascript

pradhip_nit
11-24-2005, 06:09 AM
Hi,

<SCRIPT LANGUAGE='JavaScript'>
function clean()
{
document.clear();
}
</SCRIPT>
abcdefghijklmnopqrstuvwxyz
<INPUT TYPE="submit" value = 'submit' onclick='clean()'>

I am using the above code to clear the contents of the window
.. but on clicking the button i am unable to clear the content.

So if anybody knows how to clear the contents of the window, u can share it...

Thanks in advance,
Pradhip

fci
11-24-2005, 06:12 AM
document.innerHTML='';

pradhip_nit
11-24-2005, 06:31 AM
Its not working !!

i know that i can use document.write(' '); instead

But on clicking the button,
i want to clear the contents and then i want to display some other data from html...

JohnKrutsch
11-24-2005, 09:30 PM
Try something like this:

document.body.innerHTML="New HTML here";


 

TOP

Hyperthreading hurts s
HP sharpens blade PC l
Apple goes for Quad po
Itanium gets scaled do

For more info

Hyperthreading hurts s
HP sharpens blade PC l
problem with an ImageP
Modifying a navigation
convert text to intege
Anyone knows to clear 
Automatically generate
document.getElementByI
Hi question about stor
Netscape Problems :-( 

News Archive

Month and Year drop do
navigation button/imag
doubt in window.open()
undo redo script 
Mimick "View Source" w
print Question 
No-image representatio
What's wrong with this
Urgent help in Javascr
Gurt Menu assistance 

Related stories:

Automatically generates color tags(<color="red">,</color>)
document.getElementByID() Issues
Adding onclick stuff to an INPUT through javascript
Netscape Problems :-(
problem with an ImagePreview js
Can function RETURN a value?
do I need a random script script or not?

Copyright@2004-2005 www.zzcoke.com All Right Reserved

advanced web statistics