Pass value from child window to tokeninput in parents window

Pass value from child window to tokeninput in parents window

Hi,
How do I pass value from a child window to tokeninput in parents window. Below is the example of my code:

Parents window:
my Jquery Tokeninput script

  1. <input type="text" id="tokenize" name="receiver" />
  2.         <script type="text/javascript">
  3.         $(document).ready(function() {
  4.             $("#tokenize").tokenInput("root/system/application/views/ajax-user.php", {
  5.                 theme: "facebook",
  6. preventDuplicates: true,
  7. excludeCurrent: true,
  8. hintText: "Enter user name",
  9.    noResultsText: "No Record,
  10.    searchingText: "Searching..."
  11.             });
  12.         });
  13.         </script> 

Child windows:

  1. window.opener.document.frm_upload.tokenize.value = tid+'".$penerima."'