Advertisement
badlogic

Parent to child popup window

Mar 12th, 2017
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //creating new window popup
  2. onclick="javascript:openwindow('registrar.php?statpos=course_curriculum&action=search_subject_curr&cc_id=21&ccch_id=2', 'change', '');"
  3.  
  4. //button from the class
  5. $checkbox = "<input name=\'search_box\' onclick=\"searchSubjects(\'',csh.college_headers_subject_id,'\',\'',fsn.subjname_name,'\')\" type=\'checkbox\'  value=\"',csh.college_headers_subject_id,'\"  onclick=\'\'  />";
  6.  
  7.  
  8.  
  9. <script>
  10. //searchInput is the id of the parent window
  11.     function searchSubjects(subject_id,subject_name){
  12.  
  13.         opener.document.getElementById('searchInput').value = subject_id;
  14.         window.close();
  15.  
  16.         }
  17.  
  18. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement