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>

LVL 12
pigmentartsAsked:
Who is Participating?
 
SvenTech Lead Web-DevelopmentCommented:
Or <a href="#"  onclick="window.opener.location.reload();window.close();">close</a>
0
 
SvenTech Lead Web-DevelopmentCommented:
Try <a href="#"  onclick="window.opener.document.location.href=window.opener.document.location.href;window.close();">close</a>
0
 
pigmentartsAuthor Commented:
seems to work, thanks. :)
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.