Calling a JavaScript function of Parent Window from Child Window

Code in Parent Page
  1. <script type="text/javascript">  
  2.    function openChildWindow() {  
  3.        window.open('UrlToOpen''mywindow1234567890');  
  4.        window.CallParentfunction= function () {  
  5.          //Your Code Functionality  
  6.        }  
  7.     }  
  8. </script>  
  9.   
  10. <a onclick="openChildWindow(); return false;">Open Child Window</a> 
Code in Child Page
 
Calling Function of Parent Window in Child Window:
  1. <script type="text/javascript">  
  2.      window.onunload = function (e) {  
  3.      opener.CallParentfunction();  
  4.      };  
  5. </script> 
Note:This doesn't work on IE if the the Child window and the Parent window are not from the same domain.