• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 673
  • Last Modified:

Refresh opener window

Hi,
In the script below, how do I get the opener window to refresh.
Thanx

<script language="javascript">
function IsClosed(){
      if (window.opener.closed)
      {
            document.getElementById('closed').innerHTML = "You must have the parent window open";
            setTimeout('window.close();', 5000);
      }else{
            window.opener. ////////////////////HERES WHERE I NEED TO GET THE OPENER TO REFRESH
            window.close();
      }
 }
</script>
0
dpinto04
Asked:
dpinto04
1 Solution
 
shaggy_the_sheepCommented:
Hi

change your function to this

function IsClosed(){
     if (window.opener.closed)
     {
          document.getElementById('closed').innerHTML = "You must have the parent window open";
          setTimeout('window.close();', 5000);
     }else{
          window.opener.location.reload(true)
          window.close();
     }
 }

Richard
0
 
Pravin AsarCommented:
user window.opener.location.reload() or
 window.opener.location.reload(true)  ==> This reloads from server, forcing a cache control

<script language="javascript">
function IsClosed(){
     if (window.opener.closed)
     {
          document.getElementById('closed').innerHTML = "You must have the parent window open";
          setTimeout('window.close();', 5000);
     }else{
          window.opener.location.reload();
          window.close();
     }
 }
</script>

0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now