title: Pop-up for Editing Input Field
body: <p>I am creating an HTML form. Inside it, there is one input box, for which I want to create a popup that provides a textarea. This would give the user more space to enter a larger block of text. My current code enables the child window (pop-up) to send the entered text back to the parent. However, I also need to have the parent window send the current text to the textarea in the child window. I'd appreciate some help.</p>
  
  <p>I created a simplified version, with just one input box, for the purpose of this discussion. </p>
  
  <p>Here is the code from the parent:</p>
  
  <pre><code>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;
  &lt;SCRIPT LANGUAGE="JavaScript"&gt;&lt;!--
  function openChild(file,window) {
      childWindow=open(file,window,'resizable=no,width=200,height=400');
      if (childWindow.opener == null) childWindow.opener = self;
      }
  //--&gt;&lt;/SCRIPT&gt;
  
  &lt;BODY&gt;
  &lt;FORM NAME="parentForm"&gt;
  &lt;INPUT TYPE="button" VALUE="Open child" onClick="openChild('examplejs2.html','win2')"&gt;
  &lt;BR&gt;&lt;INPUT NAME="pf1" TYPE="TEXT" VALUE=""&gt;
  &lt;/FORM&gt;&lt;/BODY&gt;&lt;/HTML&gt;
  </code></pre>
  
  <p>Here is the code from the child window (pop-up):</p>
  
  <pre><code>&lt;HTML&gt;&lt;HEAD&gt;
  &lt;SCRIPT LANGUAGE="JavaScript"&gt;&lt;!--
  function updateParent() {
      opener.document.parentForm.pf1.value = document.childForm.cf1.value;
      opener.document.parentForm.pf2.value = document.childForm.cf2.value;
      if (document.childForm.cf3[0].checked)
         opener.document.parentForm.pf3[0].checked = true;
      if (document.childForm.cf3[1].checked)
         opener.document.parentForm.pf3[1].checked = true;       
      self.close();
      return false;
  }
  //--&gt;&lt;/SCRIPT&gt;
  &lt;/HEAD&gt;&lt;BODY&gt;
  &lt;FORM NAME="childForm" onSubmit="return updateParent();"&gt;
  &lt;BR&gt;&lt;INPUT NAME="cf1" TYPE="TEXT" VALUE=""&gt;
  &lt;/FORM&gt;&lt;/BODY&gt;&lt;/HTML&gt;
  </code></pre>