www.webdeveloper.com
Results 1 to 3 of 3

Thread: how i can clear popup window content

  1. #1
    Join Date
    Apr 2011
    Posts
    7

    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 :
    http://i1138.photobucket.com/albums/...ista91/6-1.png

  2. #2
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    What do you want to clear:
    - the table content ( 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.

  3. #3
    Join Date
    Apr 2011
    Posts
    7
    Quote Originally Posted by Kor View Post
    What do you want to clear:
    - the table content ( 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.
    I want clear cells content

    ok sorry this the part of code :
    HTML Code:
    <!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>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles