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

parent window reload?

I have a link on a page which options up a new window, once done the user closes the new window and i would like to reload (refresh) the parent window. i have the following but still not joy

product.cfm page ---------------------------------

<script language="javascript" type="text/javascript">
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}
// -->
</script>

<a href="assign-options.cfm" onclick="NewWindow(this.href,'mywin','400','400','no','center');return false" onfocus="this.blur()">YourLinkText</a>


-----------------------

window that opens up  assign-options.cfm

 <a href="#"  onclick="parent.location.reload(true);window.close();">close</a>

0
pigmentarts
Asked:
pigmentarts
  • 2
1 Solution
 
SvenTech Lead Web-DevelopmentCommented:
Try <a href="#"  onclick="window.opener.document.location.href=window.opener.document.location.href;window.close();">close</a>
0
 
SvenTech Lead Web-DevelopmentCommented:
Or <a href="#"  onclick="window.opener.location.reload();window.close();">close</a>
0
 
pigmentartsAuthor Commented:
seems to work, thanks. :)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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