title: Form.target = window.opener.name not working
body: <p>I have this function in my parent file:</p>
  
  <pre><code>$(function () {
  $('#xybutton').click(function (event) {
      event.preventDefault();
      window.name = 'parentwindow';
      var popupwindow = window.open(
          'popup.php',
          '',
          'toolbar=0,location=0,directories=0,status=1,' +
          'menubar=0,scrollbars=yes,resizable=yes,' +
          'width=600,' +
          'height=400'
          );
      if(window.focus){
          popupwindow.focus();
      }
  });
  });
  </code></pre>
  
  <p>I have a form in my popup window </p>
  
  <pre><code>&lt;form method="post" action="newdoc.php" enctype="multipart/form-data" class="ajax lock-page" id="xyform" name="xyform"&gt;
  </code></pre>
  
  <p>I have this function in corresponding js file:</p>
  
  <pre><code>$(document).ready(function() {
  $('#xyform').target = 'parentwindow'; //I also tried window.opener.name
  console.log(window.opener.name); //This prints parentwindow
  });
  </code></pre>
  
  <p>But still the form's result opens in the popup window rather than opening in parent.
  Please tell me where am I going wrong.</p>