/    Sign up×
Community /Pin to ProfileBookmark

how i can clear popup window content

Hi,
I have popup window and i want when i press on “Clear” table content clear ..
I used document.writeln to write into the popup window ..
see the pic :
[url]http://i1138.photobucket.com/albums/n540/Interista91/6-1.png[/url]

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@KorMay 05.2011 — What do you want to clear:

- the table [I]content[/I] ( the cells' content)?

- the whole table as element?

- the whole content of the document?

And, please, post a code. When it comes about programming we need to see codes, not pictures.
Copy linkTweet thisAlerts:
@InteristaauthorMay 05.2011 — What do you want to clear:

- the table [I]content[/I] ( the cells' content)?

- the whole table as element?

- the whole content of the document?

And, please, post a code. When it comes about programming we need to see codes, not pictures.[/QUOTE]


I want clear cells content ?

ok sorry this the part of code :
[code=html]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Home Page</title>



<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script type="text/javascript">
function clear()
{

RVWindow.document.getElementsByTagName('body')[0].innerHTML = 'dsa';

}
function RVClick()
{
RVWindow = window.open('','RV','width=400,height=200,scrollbars=yes');
RVWindow.document.write(""+rv+"");
RVWindow.document.write("</br>");
RVWindow.focus();
RVWindow.document.write("<A HREF='#'onclick='clear()'>Clear</A>");


}
function RVOver()
{
document.getElementById("rv").src ="rvover.png"
}
function RVOut()
{
document.getElementById("rv").src ="RV.png"
}
function hospitalOver()
{

document.getElementById("hospital").src ="images/hospitalover.png"
}

function hospitalOut()
{

document.getElementById("hospital").src ="images/hospital.png"
}

function hospitalClick()
{
form1.textfield.value="The Hospital";
}

var rv="<table align='center' width='320' border='1' cellspacing='0' cellpadding='0'><tr><td><div align='center'>The Place </div></td><td><div align='center'>Visited Time </div></td></tr>";

var swfContent="";
function guide()
{

swfContent="";

if (form1.textfield.value=="The Hospital")
{
var hospitaltime = new Date();
rv+="<tr><td>The Hospital</td><td>"+hospitaltime.toLocaleString()+"</td></tr>";
swfContent = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='600' height='424'>"+
"<param name='movie' value='hospital.swf'>"+
"<param name='quality' value='high'>"+
"<embed src='hospital.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='600' height='424'>"
"</embed>"+
"</object>";
pic.innerHTML=swfContent;

}

}


</script>
<style type="text/css">
<!--
body {
background-image: url(background.jpg);
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--

function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>

<body>
<div id="Layer1" style="position:absolute; left:300px; top:0px; width:636px; height:58px; z-index:1">
<div align="center"><img src="header.png" width="711" height="77" align="middle"></div>
</div>
<div id="Layer2" style="position:absolute; left:300px; top:562px; width:684px; height:59px; z-index:2"><img src="footer.png" width="711" height="59"></div>
<p>&nbsp;</p>
<p><br>
</p>
<p>&nbsp; </p>
<table width="1100" height="424" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td style="border-style:dashed;border-width:1px;border-spacing:2px;" id="pic" width="600" height="424" background="Red.png"><p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p></td>
<td width="300" height="324" align="right" valign="middle"><form name="form1" method="post" action="">
<p align="center">&nbsp;</p>
<p align="center">&nbsp;</p>
<p align="center">
<input type="text" name="textfield">
</p>
<p align="center">

<input type="button" name="Button" value="Guide Me!" onClick="guide()">
</p>
<p align="left">&nbsp;</p>
</form>
<div align="center">
<p align="left"><img id="hospital" src="images/hospital.png" width="125" height="21" onMouseOver="hospitalOver()" onMouseOut="hospitalOut()" onClick="hospitalClick()">
<p align="center"><img id="rv" src="RV.png" width="132" height="27" onMouseOver="RVOver()" onMouseOut="RVOut()" onClick="RVClick()"></p>
</div></td>
<td width="200" align="right" valign="middle">&nbsp;</td>
</tr>
</table>
<div id="Layer1" style="position:absolute; left:300px; top:0px; width:636px; height:58px; z-index:1">
<div align="center"><a href="home.htm"><img src="header.png" width="711" height="77" border="0" align="middle"></a></div>
</div>
</body>
</html>
[/code]
×

Success!

Help @Interista spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...