Skip to Content

Javascript send/pass value of child window to parent window

Posted on

We can use window.opener to call parent window from child window.

  <script language=”javascript” type=”text/javascript”>
    function SendValueToParent() {
      var myVal = document.getElementById(‘mytxt’).value;
      return false;

  Type text here and send it to parent window:
  <input id=”mytxt” type=”text” />
  <input id=”btn1″ type=”button” value=”Send Value to Parent” onclick=”javascript:return SendValueToParent();” />
comments powered by Disqus