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>
dpinto04Asked:
Who is Participating?
 
shaggy_the_sheepConnect With a Mentor Commented:
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 AsarPrincipal Systems EngineerCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.