Passing Information
from the Child Window to the Parent Window

The "Parent" Window

<SCRIPT>

/*
tells the browser to create a child window, using the "little.htm" file, and naming it newWin. The rest of the line specifies the child's "featureList".
*/

newWindow = open('little.htm', 'newWin',
                                  'toolbar=yes,location=yes,scrollbars=yes,width=300,height=100');

</SCRIPT>

<BODY>

<FORM NAME="outputForm">
     <INPUT TYPE="TEXT" NAME="msgLine" VALUE>
<
/
FORM>

The "Child" Window

<SCRIPT>

/* the textfield is the value passed from the form below (on this child page) */

function updateParent(textField) {

/*
the opener property is how JavaScript references back to the parent document that opened the child window. So what we are doing here is assigning "Hello " + textField.value + "!" to the text box contained in the form outputForm on the parent document that spawned this window
*/

opener.document.outputForm.msgLine.value = "Hello " + textField.value + "!";

}

</SCRIPT>

<BODY>

<FORM>
     <INPUT TYPE="TEXT" onBlur="updateParent(this);">
</FORM>